diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-04-25 16:28:40 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-04-26 12:57:10 +0300 |
commit | 0172cf3a2341800ffa3a7463fcc5ce6e6956c9c3 (patch) | |
tree | 351b51e5039347e3a89987f124d27ab6165a129d | |
parent | 1ecfc432e1c177de3c2dce9cef14730d39e0487b (diff) | |
download | bluetooth-next-0172cf3a2341800ffa3a7463fcc5ce6e6956c9c3.tar.gz |
Bluetooth: Fix LE vs BR/EDR selection when connecting
The choice between LE and BR/EDR should be made on the destination
address type instead of the destination CID. This is particularly
important when in the future more than one CID will be allowed for LE.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r-- | net/bluetooth/l2cap_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 5a834c766f699..8f73837b58e55 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -1792,7 +1792,7 @@ int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid, auth_type = l2cap_get_auth_type(chan); - if (chan->dcid == L2CAP_CID_LE_ATT) + if (bdaddr_type_is_le(dst_type)) hcon = hci_connect(hdev, LE_LINK, dst, dst_type, chan->sec_level, auth_type); else |