diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-08-07 20:52:20 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-09-24 18:10:14 +0200 |
commit | 6e4f584e2be6efb57d311f4309d4f5a96fb247b8 (patch) | |
tree | 0c5ea12eabb16ce5886af41705220de016c026ed /drivers | |
parent | 2c270b0e51ad5a29cf01e1b8d3d651b185d3d3b5 (diff) |
mt76: mt7615: do not do any work in napi poll after calling napi_complete_done()
Fixes a race condition where multiple tx cleanup tasks could run in parallel
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/dma.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/dma.c b/drivers/net/wireless/mediatek/mt76/mt7615/dma.c index c876eb1e1681..3b375fdf31b8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/dma.c @@ -117,14 +117,12 @@ static int mt7615_poll_tx(struct napi_struct *napi, int budget) mt7615_tx_cleanup(dev); - if (napi_complete_done(napi, 0)) - mt7615_irq_enable(dev, MT_INT_TX_DONE_ALL); - - mt7615_tx_cleanup(dev); - mt7615_pm_power_save_sched(dev); tasklet_schedule(&dev->mt76.tx_tasklet); + if (napi_complete_done(napi, 0)) + mt7615_irq_enable(dev, MT_INT_TX_DONE_ALL); + return 0; } |