Commit 41634aa8 authored by Felix Fietkau's avatar Felix Fietkau

mt76: only schedule txqs from the tx tasklet

Reduces lock contention from the tx path and improves performance
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent a33b8ab8
...@@ -205,8 +205,6 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush) ...@@ -205,8 +205,6 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
spin_unlock_bh(&q->lock); spin_unlock_bh(&q->lock);
if (!flush)
mt76_txq_schedule(dev, qid);
if (wake) if (wake)
ieee80211_wake_queue(dev->hw, qid); ieee80211_wake_queue(dev->hw, qid);
} }
......
...@@ -145,6 +145,8 @@ mt7603_tx_tasklet(unsigned long data) ...@@ -145,6 +145,8 @@ mt7603_tx_tasklet(unsigned long data)
for (i = MT_TXQ_MCU; i >= 0; i--) for (i = MT_TXQ_MCU; i >= 0; i--)
mt76_queue_tx_cleanup(dev, i, false); mt76_queue_tx_cleanup(dev, i, false);
mt76_txq_schedule_all(&dev->mt76);
mt7603_irq_enable(dev, MT_INT_TX_DONE_ALL); mt7603_irq_enable(dev, MT_INT_TX_DONE_ALL);
} }
......
...@@ -162,6 +162,9 @@ static void mt76x02_tx_tasklet(unsigned long data) ...@@ -162,6 +162,9 @@ static void mt76x02_tx_tasklet(unsigned long data)
mt76_queue_tx_cleanup(dev, i, false); mt76_queue_tx_cleanup(dev, i, false);
mt76x02_mac_poll_tx_status(dev, false); mt76x02_mac_poll_tx_status(dev, false);
mt76_txq_schedule_all(&dev->mt76);
mt76x02_irq_enable(dev, MT_INT_TX_DONE_ALL); mt76x02_irq_enable(dev, MT_INT_TX_DONE_ALL);
} }
......
...@@ -595,7 +595,7 @@ void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq) ...@@ -595,7 +595,7 @@ void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
if (!test_bit(MT76_STATE_RUNNING, &dev->state)) if (!test_bit(MT76_STATE_RUNNING, &dev->state))
return; return;
mt76_txq_schedule(dev, txq->ac); tasklet_schedule(&dev->tx_tasklet);
} }
EXPORT_SYMBOL_GPL(mt76_wake_tx_queue); EXPORT_SYMBOL_GPL(mt76_wake_tx_queue);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment