Bluetooth: 6lowpan: Don't drop packets when run out of credits

Since l2cap_chan_send will now queue the packets there is no point in
checking the credits anymore.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Luiz Augusto von Dentz 2017-04-11 22:20:59 +03:00 committed by Marcel Holtmann
parent 24dcbf6622
commit e1008f95e1

View File

@ -478,15 +478,8 @@ static int send_pkt(struct l2cap_chan *chan, struct sk_buff *skb,
return 0;
}
if (!err)
err = (!chan->tx_credits ? -EAGAIN : 0);
if (err < 0) {
if (err == -EAGAIN)
netdev->stats.tx_dropped++;
else
if (err < 0)
netdev->stats.tx_errors++;
}
return err;
}