Skip to content

Commit 41634aa

Browse files
committed
mt76: only schedule txqs from the tx tasklet
Reduces lock contention from the tx path and improves performance Signed-off-by: Felix Fietkau <[email protected]>
1 parent a33b8ab commit 41634aa

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

drivers/net/wireless/mediatek/mt76/dma.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
205205

206206
spin_unlock_bh(&q->lock);
207207

208-
if (!flush)
209-
mt76_txq_schedule(dev, qid);
210208
if (wake)
211209
ieee80211_wake_queue(dev->hw, qid);
212210
}

drivers/net/wireless/mediatek/mt76/mt7603/dma.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ mt7603_tx_tasklet(unsigned long data)
145145
for (i = MT_TXQ_MCU; i >= 0; i--)
146146
mt76_queue_tx_cleanup(dev, i, false);
147147

148+
mt76_txq_schedule_all(&dev->mt76);
149+
148150
mt7603_irq_enable(dev, MT_INT_TX_DONE_ALL);
149151
}
150152

drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ static void mt76x02_tx_tasklet(unsigned long data)
162162
mt76_queue_tx_cleanup(dev, i, false);
163163

164164
mt76x02_mac_poll_tx_status(dev, false);
165+
166+
mt76_txq_schedule_all(&dev->mt76);
167+
165168
mt76x02_irq_enable(dev, MT_INT_TX_DONE_ALL);
166169
}
167170

drivers/net/wireless/mediatek/mt76/tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
595595
if (!test_bit(MT76_STATE_RUNNING, &dev->state))
596596
return;
597597

598-
mt76_txq_schedule(dev, txq->ac);
598+
tasklet_schedule(&dev->tx_tasklet);
599599
}
600600
EXPORT_SYMBOL_GPL(mt76_wake_tx_queue);
601601

0 commit comments

Comments
 (0)