diff options
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 1557c3c774f1..55c6836796f7 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -6394,16 +6394,13 @@ static void l2cap_att_channel(struct l2cap_conn *conn, | |||
6394 | { | 6394 | { |
6395 | struct l2cap_chan *chan; | 6395 | struct l2cap_chan *chan; |
6396 | 6396 | ||
6397 | chan = l2cap_global_chan_by_scid(0, L2CAP_CID_ATT, | 6397 | chan = l2cap_global_chan_by_scid(BT_CONNECTED, L2CAP_CID_ATT, |
6398 | conn->src, conn->dst); | 6398 | conn->src, conn->dst); |
6399 | if (!chan) | 6399 | if (!chan) |
6400 | goto drop; | 6400 | goto drop; |
6401 | 6401 | ||
6402 | BT_DBG("chan %p, len %d", chan, skb->len); | 6402 | BT_DBG("chan %p, len %d", chan, skb->len); |
6403 | 6403 | ||
6404 | if (chan->state != BT_BOUND && chan->state != BT_CONNECTED) | ||
6405 | goto drop; | ||
6406 | |||
6407 | if (chan->imtu < skb->len) | 6404 | if (chan->imtu < skb->len) |
6408 | goto drop; | 6405 | goto drop; |
6409 | 6406 | ||