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>
        if (chan->state != BT_BOUND && chan->state != BT_CONNECTED)
                goto drop;
 
-       if (l2cap_pi(sk)->chan->imtu < skb->len)
+       if (chan->imtu < skb->len)
                goto drop;
 
        if (!chan->ops->recv(chan->data, skb))
        if (chan->state != BT_BOUND && chan->state != BT_CONNECTED)
                goto drop;
 
-       if (l2cap_pi(sk)->chan->imtu < skb->len)
+       if (chan->imtu < skb->len)
                goto drop;
 
        if (!chan->ops->recv(chan->data, skb))