summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShayne Chen <shayne.chen@mediatek.com>2021-10-18 16:09:41 +0800
committerFelix Fietkau <nbd@nbd.name>2021-10-20 10:37:04 +0200
commitff8c049891688131682ac0b7fb0ef55595b19898 (patch)
treee05d0959abb96c409adc70ee5caf695dce360ac6
parent3176487f3fde6d10201e62b5b9a42c39ad22f683 (diff)
mt76: mt7915: change max rx len limit of hw modules
Update max rx len of some hw modules, which aligns out vendor SDK. In normal modes, we exchange MPDU 7991 cap with peers; however, this won't play a part in sniffer mode. To prevent packets which exceed the max MPDU size from entering specific rx path in hw, we need to set a proper limit to filter them out. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7915/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index 727c529bfdea..4fa8e7ba93e6 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -386,7 +386,7 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
FIELD_PREP(MT_MDP_RCFR1_RX_DROPPED_MCAST, MT_MDP_TO_HIF);
mt76_rmw(dev, MT_MDP_BNRCFR1(band), mask, set);
- mt76_rmw_field(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_MAX_RX_LEN, 1536);
+ mt76_rmw_field(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_MAX_RX_LEN, 0x680);
/* disable rx rate report by default due to hw issues */
mt76_clear(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_RXD_G5_EN);
}
@@ -395,7 +395,7 @@ static void mt7915_mac_init(struct mt7915_dev *dev)
{
int i;
- mt76_rmw_field(dev, MT_MDP_DCR1, MT_MDP_DCR1_MAX_RX_LEN, 1536);
+ mt76_rmw_field(dev, MT_MDP_DCR1, MT_MDP_DCR1_MAX_RX_LEN, 0x400);
/* enable hardware de-agg */
mt76_set(dev, MT_MDP_DCR0, MT_MDP_DCR0_DAMSDU_EN);