From 7d8764d320cf383c192325f7023dc7ffa0bd3f7f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 7 Oct 2019 12:33:39 +0200 Subject: [PATCH] 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 --- dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dma.c b/dma.c index e2ce59b2..4da7cffb 100644 --- a/dma.c +++ b/dma.c @@ -537,10 +537,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; }