From: Johan Hedberg Date: Mon, 29 Apr 2013 16:35:36 +0000 (+0300) Subject: Bluetooth: Fix LE vs BR/EDR selection when connecting X-Git-Tag: next-20130607~63^2~27 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0ada078b59245de972f45d4e2f2671eff27515fa;p=karo-tx-linux.git 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 Acked-by: Marcel Holtmann Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index f706ba189878..f27a3f376a40 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_ATT) + if (bdaddr_type_is_le(dst_type)) hcon = hci_connect(hdev, LE_LINK, dst, dst_type, chan->sec_level, auth_type); else