提交 e13e21dc 编写于 作者: V Vinicius Costa Gomes 提交者: Gustavo F. Padovan

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: NVinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
上级 63128451
...@@ -3965,7 +3965,7 @@ static inline int l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, str ...@@ -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 ...@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册