diff options
author | Johan Hedberg | 2013-04-29 18:35:42 +0200 |
---|---|---|
committer | Gustavo Padovan | 2013-06-23 01:23:49 +0200 |
commit | af1c01349ecc2b8ab2c329e4dbd46e9018469bd1 (patch) | |
tree | cc631d9121db930302c51de8d4a56e2567c042ad /net | |
parent | Bluetooth: Remove useless sk variable in l2cap_le_conn_ready (diff) | |
download | kernel-qcow2-linux-af1c01349ecc2b8ab2c329e4dbd46e9018469bd1.tar.gz kernel-qcow2-linux-af1c01349ecc2b8ab2c329e4dbd46e9018469bd1.tar.xz kernel-qcow2-linux-af1c01349ecc2b8ab2c329e4dbd46e9018469bd1.zip |
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>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net')
-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, { struct l2cap_chan *chan; - chan = l2cap_global_chan_by_scid(0, L2CAP_CID_ATT, + chan = l2cap_global_chan_by_scid(BT_CONNECTED, L2CAP_CID_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; |