Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1008f95 authored by Luiz Augusto von Dentz's avatar Luiz Augusto von Dentz Committed by Marcel Holtmann
Browse files

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: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Acked-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 24dcbf66
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -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;
}