mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Bluetooth: 6lowpan: Use netif APIs to flow control
Rely on netif_wake_queue and netif_stop_queue to flow control when transmit resources are unavailable. Signed-off-by: Luiz Augusto von Dentz <[email protected]> Acked-by: Jukka Rissanen <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
e1008f95e1
commit
f183e52b8e
1 changed files with 16 additions and 0 deletions
|
|
@ -867,12 +867,28 @@ static struct sk_buff *chan_alloc_skb_cb(struct l2cap_chan *chan,
|
|||
|
||||
static void chan_suspend_cb(struct l2cap_chan *chan)
|
||||
{
|
||||
struct lowpan_btle_dev *dev;
|
||||
|
||||
BT_DBG("chan %p suspend", chan);
|
||||
|
||||
dev = lookup_dev(chan->conn);
|
||||
if (!dev || !dev->netdev)
|
||||
return;
|
||||
|
||||
netif_stop_queue(dev->netdev);
|
||||
}
|
||||
|
||||
static void chan_resume_cb(struct l2cap_chan *chan)
|
||||
{
|
||||
struct lowpan_btle_dev *dev;
|
||||
|
||||
BT_DBG("chan %p resume", chan);
|
||||
|
||||
dev = lookup_dev(chan->conn);
|
||||
if (!dev || !dev->netdev)
|
||||
return;
|
||||
|
||||
netif_wake_queue(dev->netdev);
|
||||
}
|
||||
|
||||
static long chan_get_sndtimeo_cb(struct l2cap_chan *chan)
|
||||
|
|
|
|||
Loading…
Reference in a new issue