summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subsys/bluetooth/host/l2cap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/subsys/bluetooth/host/l2cap.c b/subsys/bluetooth/host/l2cap.c
index 42566da4f..e4820a632 100644
--- a/subsys/bluetooth/host/l2cap.c
+++ b/subsys/bluetooth/host/l2cap.c
@@ -316,7 +316,8 @@ static bool l2cap_chan_add(struct bt_conn *conn, struct bt_l2cap_chan *chan,
bt_l2cap_chan_add(conn, chan, destroy);
- if (IS_ENABLED(CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL)) {
+ if (IS_ENABLED(CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL) &&
+ L2CAP_LE_CID_IS_DYN(ch->rx.cid)) {
bt_l2cap_chan_set_state(chan, BT_L2CAP_CONNECT);
}