[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <780d576a44c7f241886aaf8b3dd5eb51a879dfcd.1673103214.git.lorenzo@kernel.org>
Date: Sat, 7 Jan 2023 16:00:37 +0100
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: linux-wireless@...r.kernel.org
Cc: netdev@...r.kernel.org, lorenzo.bianconi@...hat.com, nbd@....name,
sujuan.chen@...iatek.com, daniel@...rotopia.org, leon@...nel.org
Subject: [PATCH 2/4] wifi: mt76: dma: reset wed queues in mt76_dma_rx_reset
From: Sujuan Chen <sujuan.chen@...iatek.com>
This is a preliminary patch to introduce proper wed reset support.
Tested-by: Daniel Golle <daniel@...rotopia.org>
Co-developed-by: Lorenzo Bianconi <lorenzo@...nel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
Signed-off-by: Sujuan Chen <sujuan.chen@...iatek.com>
---
drivers/net/wireless/mediatek/mt76/dma.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c
index 5629b949fac0..93c42082f1c2 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/dma.c
@@ -766,8 +766,13 @@ mt76_dma_rx_reset(struct mt76_dev *dev, enum mt76_rxq_id qid)
q->desc[i].ctrl = cpu_to_le32(MT_DMA_CTL_DMA_DONE);
mt76_dma_rx_cleanup(dev, q);
- mt76_dma_sync_idx(dev, q);
- mt76_dma_rx_fill(dev, q, false);
+
+ /* reset WED rx queues */
+ mt76_dma_wed_setup(dev, q, true);
+ if (q->flags != MT_WED_Q_TXFREE) {
+ mt76_dma_sync_idx(dev, q);
+ mt76_dma_rx_fill(dev, q, false);
+ }
}
static void
--
2.39.0
Powered by blists - more mailing lists