Bluetooth: Remove broken check for existing rx CID
This check was trying to optimize the CID allocation, but it adds little value and was actually broken because of the wrong CID passed to the lookup function. Change-Id: I793be0c5eeccb931cea4a5430991d4e692926da6 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
4f66545ba7
commit
c20b68a221
1 changed files with 0 additions and 6 deletions
|
@ -120,12 +120,6 @@ static void l2cap_chan_alloc_cid(struct bt_conn *conn,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try matching dcid first */
|
|
||||||
if (!bt_l2cap_lookup_rx_cid(conn, chan->rx.cid)) {
|
|
||||||
chan->rx.cid = chan->tx.cid;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO: Check conn type before assigning cid */
|
/* TODO: Check conn type before assigning cid */
|
||||||
for (cid = L2CAP_LE_DYN_CID_START; cid <= L2CAP_LE_DYN_CID_END; cid++) {
|
for (cid = L2CAP_LE_DYN_CID_START; cid <= L2CAP_LE_DYN_CID_END; cid++) {
|
||||||
if (!bt_l2cap_lookup_rx_cid(conn, cid)) {
|
if (!bt_l2cap_lookup_rx_cid(conn, cid)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue