summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2017-04-11 22:20:59 +0300
committerMarcel Holtmann <marcel@holtmann.org>2017-04-12 22:02:40 +0200
commite1008f95e1e7762fade7ccbc973247a3b32edddb (patch)
tree072a7550a6a7484629a689881f4ba8d2d723bf40
parent24dcbf66220564cdb23129aa3854b49532b1a9d8 (diff)
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>
-rw-r--r--net/bluetooth/6lowpan.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 5b91e85cf1c6..22bd936ed2ce 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -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
- netdev->stats.tx_errors++;
- }
+ if (err < 0)
+ netdev->stats.tx_errors++;
return err;
}