aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2012-04-24 21:02:54 -0300
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 01:40:45 -0300
commitb12f62cfd9f46ac70013ce661640174b489efd39 (patch)
tree5ad852475d40051fa86fe613d2b9990cd816656b /net/bluetooth/l2cap_core.c
parentBluetooth: Move bdaddr_to_le to hci_core (diff)
downloadlinux-dev-b12f62cfd9f46ac70013ce661640174b489efd39.tar.xz
linux-dev-b12f62cfd9f46ac70013ce661640174b489efd39.zip
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>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 97af2b4f6238..61af06d35335 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -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);