Re: [PATCH 1/2] Bluetooth: Add address type to mgmt_pair_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

On 11/10/2011 2:07 PM, johan.hedberg@xxxxxxxxx wrote:

-	entry = hci_find_adv_entry(hdev,&cp->bdaddr);
-	if (entry)
-		conn = hci_connect(hdev, LE_LINK,&cp->bdaddr, sec_level,
+	if (cp->addr.type == MGMT_ADDR_BREDR)
+		conn = hci_connect(hdev, ACL_LINK,&cp->addr.bdaddr, sec_level,
  								auth_type);
  	else
-		conn = hci_connect(hdev, ACL_LINK,&cp->bdaddr, sec_level,
+		conn = hci_connect(hdev, LE_LINK,&cp->addr.bdaddr, sec_level,
  								auth_type);


Are we differentiating between Dual Mode and BR/EDR here? If we are, we may want to reverse the logic so that it connects with an LE_LINK if the addr type == MGMT_ADDR_LE, and then connects to an ACL_LINK otherwise (as the else).

Unless this is being implimented as a bitmask, in which case the if would be "if (cp->addr.type & MGMT_ADDR_BREDR)", at which point I have no objection.

Because of course Dual mode devices must use the ACL_LINK between each other.


--
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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux