Bluetooth: L2CAP: Fix not updating CoC channel state

Channel state shall be updated properly otherwise it may cause unexpected
errors.

Change-Id: Ifd54d6bd3c5b44a40c315fd8a2946b30168aa65f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2016-11-03 15:16:03 +02:00 committed by Johan Hedberg
commit 349230321f

View file

@ -909,6 +909,9 @@ static void le_conn_rsp(struct bt_l2cap *l2cap, uint8_t ident,
chan->tx.mtu = mtu;
chan->tx.mps = mps;
/* Update state */
chan->chan.state = BT_L2CAP_CONNECTED;
if (chan->chan.ops && chan->chan.ops->connected) {
chan->chan.ops->connected(&chan->chan);
}