Browse Source

Bluetooth: Remove useless access to the socket

We already have access to the chan, we don't have to access the
socket to get its imtu.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes 14 years ago
parent
commit
e13e21dc5d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      net/bluetooth/l2cap_core.c

+ 2 - 2
net/bluetooth/l2cap_core.c

@@ -3965,7 +3965,7 @@ static inline int l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, str
 	if (chan->state != BT_BOUND && chan->state != BT_CONNECTED)
 	if (chan->state != BT_BOUND && chan->state != BT_CONNECTED)
 		goto drop;
 		goto drop;
 
 
-	if (l2cap_pi(sk)->chan->imtu < skb->len)
+	if (chan->imtu < skb->len)
 		goto drop;
 		goto drop;
 
 
 	if (!chan->ops->recv(chan->data, skb))
 	if (!chan->ops->recv(chan->data, skb))
@@ -3998,7 +3998,7 @@ static inline int l2cap_att_channel(struct l2cap_conn *conn, __le16 cid, struct
 	if (chan->state != BT_BOUND && chan->state != BT_CONNECTED)
 	if (chan->state != BT_BOUND && chan->state != BT_CONNECTED)
 		goto drop;
 		goto drop;
 
 
-	if (l2cap_pi(sk)->chan->imtu < skb->len)
+	if (chan->imtu < skb->len)
 		goto drop;
 		goto drop;
 
 
 	if (!chan->ops->recv(chan->data, skb))
 	if (!chan->ops->recv(chan->data, skb))