diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2020-11-11 14:47:31 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-12-04 14:31:15 +0100 |
commit | e637763b606b7a4512e4324529170b193cbe2848 (patch) | |
tree | 557051136ac6ddd96f39fe1d2e200388dc2c313c /drivers/net/wireless/mediatek/mt76/sdio.c | |
parent | d95093a14369c71c8b70972853ac051012217072 (diff) | |
download | linux-stable-e637763b606b7a4512e4324529170b193cbe2848.tar.gz linux-stable-e637763b606b7a4512e4324529170b193cbe2848.tar.bz2 linux-stable-e637763b606b7a4512e4324529170b193cbe2848.zip |
mt76: move mcu queues to mt76_dev q_mcu array
Move mcu queue to a dedicated array q_mcu in mt76_dev structure.
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/sdio.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/sdio.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/sdio.c b/drivers/net/wireless/mediatek/mt76/sdio.c index fce133736273..7a633f0e9ff6 100644 --- a/drivers/net/wireless/mediatek/mt76/sdio.c +++ b/drivers/net/wireless/mediatek/mt76/sdio.c @@ -74,8 +74,8 @@ static int mt76s_alloc_tx(struct mt76_dev *dev) if (IS_ERR(q)) return PTR_ERR(q); - q->qid = MT_TXQ_MCU; - dev->q_tx[MT_TXQ_MCU] = q; + q->qid = MT_MCUQ_WM; + dev->q_mcu[MT_MCUQ_WM] = q; return 0; } @@ -157,7 +157,7 @@ static void mt76s_net_worker(struct mt76_worker *w) static int mt76s_process_tx_queue(struct mt76_dev *dev, struct mt76_queue *q) { - bool wake, mcu = q == dev->q_tx[MT_TXQ_MCU]; + bool wake, mcu = q == dev->q_mcu[MT_MCUQ_WM]; struct mt76_queue_entry entry; int nframes = 0; @@ -203,8 +203,9 @@ static void mt76s_status_worker(struct mt76_worker *w) int i, nframes; do { - nframes = 0; - for (i = 0; i < MT_TXQ_MCU_WA; i++) + nframes = mt76s_process_tx_queue(dev, dev->q_mcu[MT_MCUQ_WM]); + + for (i = 0; i <= MT_TXQ_PSD; i++) nframes += mt76s_process_tx_queue(dev, dev->q_tx[i]); if (dev->drv->tx_status_data && |