diff options
author | Sujuan Chen <sujuan.chen@mediatek.com> | 2023-01-17 15:02:54 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-02-03 14:47:48 +0100 |
commit | 3bc4b811688dad5d293a7dcc969d0c387bf4e369 (patch) | |
tree | b1c1d4fbdb0516ca410397d3f0f2616e3d706c8e /drivers/net/wireless/mediatek/mt76/dma.c | |
parent | 1d5f5d55ef08b91e7ada0488733cb4af4bbcd538 (diff) | |
download | linux-3bc4b811688dad5d293a7dcc969d0c387bf4e369.tar.gz |
wifi: mt76: dma: reset wed queues in mt76_dma_rx_reset
This is a preliminary patch to introduce proper wed reset support.
Tested-by: Daniel Golle <daniel@makrotopia.org>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
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, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c index b3965ed1f4e5..3bf3216f2f9d 100644 --- a/drivers/net/wireless/mediatek/mt76/dma.c +++ b/drivers/net/wireless/mediatek/mt76/dma.c @@ -758,8 +758,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 |