summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2017-01-20 17:01:57 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2017-01-28 08:43:41 +0200
commit278bd910d516fa2d879c8f02e6990d9a6643ca18 (patch)
tree4c8d8800a0f1967c50df1edc87bd033a46cdbea7
parent42a175f300e95138289f6b59dcbb0776c32e091e (diff)
Bluetooth: L2CAP: Only set state for dynamic channels
Fixed channels don't really use channels state as they don't need connection setup. Change-Id: Ie8b1327db0269a45e9ccb6049f8dda87aa445fb5 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-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);
}