Hi Marcel,
On 11/9/2011 2:26 PM, Marcel Holtmann wrote:
+ conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK,&cp->bdaddr);
+ if (!conn) {
+ conn = hci_conn_hash_lookup_ba(hdev, LE_LINK,&cp->bdaddr);
+ if (!conn) {
+ err = cmd_status(sk, index, mgmt_op, ENOTCONN);
+ goto done;
+ }
+
+ /* Forward Confirm response to SMP */
+
+ err = cmd_status(sk, index, mgmt_op, 0);
+ goto done;
+
}
I am a bit lost why we are trying to find an ACL_LINK here first.
We want to route the confirmation to the Secure Simple Pair HCI command
if this is being done on an ACL link, and to the SMP pairing algorythm
if it is being done on an LE link.
While I suppose we could route all non-LE results to the related HCI
command, it seemed cleaner to me to reject it with an ENOTCONN, rather
than make an invalid HCI call, and depending on the baseband generating
the error.
--
Brian Gix
bgix@xxxxxxxxxxxxxx
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html