summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2020-11-11 16:47:31 +0300
committerFelix Fietkau <nbd@nbd.name>2020-12-04 16:31:15 +0300
commite637763b606b7a4512e4324529170b193cbe2848 (patch)
tree557051136ac6ddd96f39fe1d2e200388dc2c313c /drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c
parentd95093a14369c71c8b70972853ac051012217072 (diff)
downloadlinux-e637763b606b7a4512e4324529170b193cbe2848.tar.xz
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/mt7615/sdio_txrx.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c b/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c
index ab883b4bca45..9cd33dd8b20c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c
@@ -217,7 +217,7 @@ static int __mt7663s_xmit_queue(struct mt76_dev *dev, u8 *data, int len)
static int mt7663s_tx_run_queue(struct mt76_dev *dev, struct mt76_queue *q)
{
int qid, err, nframes = 0, len = 0, pse_sz = 0, ple_sz = 0;
- bool mcu = q == dev->q_tx[MT_TXQ_MCU];
+ bool mcu = q == dev->q_mcu[MT_MCUQ_WM];
struct mt76_sdio *sdio = &dev->sdio;
qid = mcu ? ARRAY_SIZE(sdio->xmit_buf) - 1 : q->qid;
@@ -286,11 +286,14 @@ void mt7663s_txrx_worker(struct mt76_worker *w)
nframes = 0;
/* tx */
- for (i = 0; i < MT_TXQ_MCU_WA; i++) {
+ for (i = 0; i <= MT_TXQ_PSD; i++) {
ret = mt7663s_tx_run_queue(dev, dev->q_tx[i]);
if (ret > 0)
nframes += ret;
}
+ ret = mt7663s_tx_run_queue(dev, dev->q_mcu[MT_MCUQ_WM]);
+ if (ret > 0)
+ nframes += ret;
/* rx */
ret = mt7663s_rx_handler(dev);