diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2020-11-11 14:47:27 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-12-04 14:31:14 +0100 |
commit | e5655492e33c2e6b83ddb07c75fe91a64f07b8bc (patch) | |
tree | 045a8a156ee3660976952c2c56d56357097df8f9 /drivers/net/wireless/mediatek/mt76/dma.c | |
parent | 264b7b19861d39bf01c3c4fcc4c786c28adcce3e (diff) | |
download | linux-stable-e5655492e33c2e6b83ddb07c75fe91a64f07b8bc.tar.gz linux-stable-e5655492e33c2e6b83ddb07c75fe91a64f07b8bc.tar.bz2 linux-stable-e5655492e33c2e6b83ddb07c75fe91a64f07b8bc.zip |
mt76: dma: rely on mt76_queue in mt76_dma_tx_cleanup signature
This is a preliminary patch to move data queues in mt76_phy and properly
support dbdc
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/dma.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/dma.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c index 145e839fea4e..31ce7dc7643b 100644 --- a/drivers/net/wireless/mediatek/mt76/dma.c +++ b/drivers/net/wireless/mediatek/mt76/dma.c @@ -217,9 +217,8 @@ mt76_dma_kick_queue(struct mt76_dev *dev, struct mt76_queue *q) } static void -mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush) +mt76_dma_tx_cleanup(struct mt76_dev *dev, struct mt76_queue *q, bool flush) { - struct mt76_queue *q = dev->q_tx[qid]; struct mt76_queue_entry entry; bool wake = false; int last; @@ -255,7 +254,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush) } wake = wake && q->stopped && - qid < IEEE80211_NUM_ACS && q->queued < q->ndesc - 8; + q->qid < IEEE80211_NUM_ACS && q->queued < q->ndesc - 8; if (wake) q->stopped = false; @@ -263,7 +262,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush) wake_up(&dev->tx_wait); if (wake) - ieee80211_wake_queue(dev->hw, qid); + ieee80211_wake_queue(dev->hw, q->qid); } static void * @@ -664,7 +663,7 @@ void mt76_dma_cleanup(struct mt76_dev *dev) mt76_worker_disable(&dev->tx_worker); netif_napi_del(&dev->tx_napi); for (i = 0; i < ARRAY_SIZE(dev->q_tx); i++) - mt76_dma_tx_cleanup(dev, i, true); + mt76_dma_tx_cleanup(dev, dev->q_tx[i], true); mt76_for_each_q_rx(dev, i) { netif_napi_del(&dev->napi[i]); |