]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Bluetooth: Fix hardcoding ATT CID in __l2cap_chan_add()
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 29 Apr 2013 16:35:38 +0000 (19:35 +0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 29 May 2013 21:43:36 +0000 (18:43 -0300)
commitd522277cf8ca3c1d2ec7cff0668ff56c4732bac2
tree152e13f45d5c3e8e1350cca8512f1056cb137830
parent02632b72c8e8a00362bc5bfe22b9a6fd52d1b53d
Bluetooth: Fix hardcoding ATT CID in __l2cap_chan_add()

Since in the future more than the ATT CID may be permissible we should
not be hardcoding it for all LE connections in __l2cap_chan_add().
Instead, the source ATT CID should only be set if the destination is
also ATT, and in other cases we should just use the existing dynamic CID
allocation function.

Assigning scid based on dcid means that whenever __l2cap_chan_add() is
called that chan->dcid is properly initialized. l2cap_le_conn_ready()
wasn't initializing is properly so this is also taken care of in this
patch.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/l2cap_core.c