diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-10-07 13:33:39 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-11-20 15:23:50 +0300 |
commit | 3e0705acd4de7821d42bea7fb01938ff05fd4d58 (patch) | |
tree | f8f88a4d61c7f4313cb464c7e82e8b3c7e0158cf /drivers/net/wireless | |
parent | e7aaa72f4728451487d7a3fe54225796d08ab1e5 (diff) | |
download | linux-3e0705acd4de7821d42bea7fb01938ff05fd4d58.tar.xz |
mt76: avoid enabling interrupt if NAPI poll is still pending
if napi_complete() returns false, it means that polling is still pending.
Interrupts should not fire until the polling is no longer scheduled
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/dma.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c index 6442a45ba303..3de744fb5e7a 100644 --- a/drivers/net/wireless/mediatek/mt76/dma.c +++ b/drivers/net/wireless/mediatek/mt76/dma.c @@ -539,10 +539,8 @@ mt76_dma_rx_poll(struct napi_struct *napi, int budget) rcu_read_unlock(); - if (done < budget) { - napi_complete(napi); + if (done < budget && napi_complete(napi)) dev->drv->rx_poll_complete(dev, qid); - } return done; } |