Bluetooth: Add dst_type parameter to hci_connect
This patch adds the dst_type parameter to hci_connect function. Instead of searching the address type in advertising cache, we use the dst_type parameter to establish LE connections. The dst_type is ignored for BR/EDR connection establishment. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Acked-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
committed by
Gustavo Padovan
parent
31f7956c66
commit
b12f62cfd9
@@ -1479,11 +1479,11 @@ int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid, bdaddr_t *d
|
||||
auth_type = l2cap_get_auth_type(chan);
|
||||
|
||||
if (chan->dcid == L2CAP_CID_LE_DATA)
|
||||
hcon = hci_connect(hdev, LE_LINK, dst,
|
||||
chan->sec_level, auth_type);
|
||||
hcon = hci_connect(hdev, LE_LINK, dst, BDADDR_LE_RANDOM,
|
||||
chan->sec_level, auth_type);
|
||||
else
|
||||
hcon = hci_connect(hdev, ACL_LINK, dst,
|
||||
chan->sec_level, auth_type);
|
||||
hcon = hci_connect(hdev, ACL_LINK, dst, BDADDR_BREDR,
|
||||
chan->sec_level, auth_type);
|
||||
|
||||
if (IS_ERR(hcon)) {
|
||||
err = PTR_ERR(hcon);
|
||||
|
||||
Reference in New Issue
Block a user