Bluetooth: L2CAP: Fix CIDs in disconnect request

The destination and source CIDs were mixed up in the L2CAP
Disconnect request.

Fixes #36665

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2021-07-19 17:38:45 +03:00 committed by Johan Hedberg
parent b676e6a628
commit 9aedfa676b

View file

@ -2607,8 +2607,8 @@ int bt_l2cap_chan_disconnect(struct bt_l2cap_chan *chan)
}
req = net_buf_add(buf, sizeof(*req));
req->dcid = sys_cpu_to_le16(ch->rx.cid);
req->scid = sys_cpu_to_le16(ch->tx.cid);
req->dcid = sys_cpu_to_le16(ch->tx.cid);
req->scid = sys_cpu_to_le16(ch->rx.cid);
l2cap_chan_send_req(chan, buf, L2CAP_DISC_TIMEOUT);
bt_l2cap_chan_set_state(chan, BT_L2CAP_DISCONNECT);