Commit e4d2b8bc authored by Peter Chiu's avatar Peter Chiu Committed by Felix Fietkau

wifi: mt76: drop the incorrect scatter and gather frame

The scatter and gather frame may be incorrect because WED and WO may
send frames to host driver interleaved.
Signed-off-by: default avatarPeter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: default avatarSujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 9c97df11
...@@ -402,8 +402,8 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx, ...@@ -402,8 +402,8 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
*info = le32_to_cpu(desc->info); *info = le32_to_cpu(desc->info);
if (mt76_queue_is_wed_rx(q)) { if (mt76_queue_is_wed_rx(q)) {
u32 token = FIELD_GET(MT_DMA_CTL_TOKEN, u32 buf1 = le32_to_cpu(desc->buf1);
le32_to_cpu(desc->buf1)); u32 token = FIELD_GET(MT_DMA_CTL_TOKEN, buf1);
struct mt76_txwi_cache *t = mt76_rx_token_release(dev, token); struct mt76_txwi_cache *t = mt76_rx_token_release(dev, token);
if (!t) if (!t)
...@@ -424,6 +424,8 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx, ...@@ -424,6 +424,8 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
*drop = !!(ctrl & (MT_DMA_CTL_TO_HOST_A | *drop = !!(ctrl & (MT_DMA_CTL_TO_HOST_A |
MT_DMA_CTL_DROP)); MT_DMA_CTL_DROP));
*drop |= !!(buf1 & MT_DMA_CTL_WO_DROP);
} }
} else { } else {
buf = e->buf; buf = e->buf;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#define MT_DMA_CTL_TO_HOST_A BIT(12) #define MT_DMA_CTL_TO_HOST_A BIT(12)
#define MT_DMA_CTL_DROP BIT(14) #define MT_DMA_CTL_DROP BIT(14)
#define MT_DMA_CTL_TOKEN GENMASK(31, 16) #define MT_DMA_CTL_TOKEN GENMASK(31, 16)
#define MT_DMA_CTL_WO_DROP BIT(8)
#define MT_DMA_PPE_CPU_REASON GENMASK(15, 11) #define MT_DMA_PPE_CPU_REASON GENMASK(15, 11)
#define MT_DMA_PPE_ENTRY GENMASK(30, 16) #define MT_DMA_PPE_ENTRY GENMASK(30, 16)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment