Skip to content

Commit

Permalink
mt76: avoid enabling interrupt if NAPI poll is still pending
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nbd168 committed Oct 7, 2019
1 parent 5b02a07 commit 7d8764d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dma.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7d8764d

Please sign in to comment.