Skip to content

Commit d1aa80c

Browse files
LuoZhongYaojhedberg
authored andcommitted
bluetooth: l2cap_br: l2cap channel used wrong cid when removing
In bt_l2cap_br_chan, rx.cid is the local cid and tx.cid is the remote cid. According to Core-5.0 Vol3.Part A 4.6-4.7, l2cap_br_remove_tx_cid should be searched using tx.cid Signed-off-by: ZhongYao Luo <[email protected]>
1 parent a4b134e commit d1aa80c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/host/l2cap_br.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ static struct bt_l2cap_br_chan *l2cap_br_remove_tx_cid(struct bt_conn *conn,
10491049
}
10501050

10511051
SYS_SLIST_FOR_EACH_CONTAINER(&conn->channels, chan, node) {
1052-
if (BR_CHAN(chan)->rx.cid == cid) {
1052+
if (BR_CHAN(chan)->tx.cid == cid) {
10531053
sys_slist_remove(&conn->channels, prev, &chan->node);
10541054
return BR_CHAN(chan);
10551055
}

0 commit comments

Comments
 (0)