diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-04-26 17:00:51 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-04-26 17:00:51 +0300 |
commit | f3bb1cc4e3020f072520e49ac8c7b9a51736f75c (patch) | |
tree | 23fccd85d83dbfeb1edc4a891a06b3724be50d6f | |
parent | de181c082eee761a9ca796bb340a690c02b15800 (diff) | |
download | bluetooth-next-f3bb1cc4e3020f072520e49ac8c7b9a51736f75c.tar.gz |
Bluetooth: Remove unnecessary L2CAP channel state check
In l2cap_att_channel() we're only interested in the BT_CONNECTED state
so this state can directly be passed to l2cap_global_chan_by_scid().
This way there's no need to do any additional state check later.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-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 2e3e426a76f63e..38229414e7b13f 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -6357,16 +6357,13 @@ static void l2cap_att_channel(struct l2cap_conn *conn, { struct l2cap_chan *chan; - chan = l2cap_global_chan_by_scid(0, L2CAP_CID_LE_ATT, + chan = l2cap_global_chan_by_scid(BT_CONNECTED, L2CAP_CID_LE_ATT, conn->src, conn->dst); if (!chan) goto drop; BT_DBG("chan %p, len %d", chan, skb->len); - if (chan->state != BT_BOUND && chan->state != BT_CONNECTED) - goto drop; - if (chan->imtu < skb->len) goto drop; |