diff --git a/mt7925/main.c b/mt7925/main.c index 75b9585b..9e0fc60d 100644 --- a/mt7925/main.c +++ b/mt7925/main.c @@ -856,11 +856,8 @@ static void mt7925_configure_filter(struct ieee80211_hw *hw, unsigned int *total_flags, u64 multicast) { -#define MT7925_FILTER_FCSFAIL BIT(2) -#define MT7925_FILTER_CONTROL BIT(5) -#define MT7925_FILTER_OTHER_BSS BIT(6) -#define MT7925_FILTER_ENABLE BIT(31) struct mt792x_dev *dev = mt792x_hw_dev(hw); + struct mt792x_phy *phy = mt792x_hw_phy(hw); u32 flags = MT7925_FILTER_ENABLE; #define MT7925_FILTER(_fif, _type) do { \ @@ -872,6 +869,8 @@ static void mt7925_configure_filter(struct ieee80211_hw *hw, MT7925_FILTER(FIF_CONTROL, CONTROL); MT7925_FILTER(FIF_OTHER_BSS, OTHER_BSS); + phy->rxfilter = flags; + mt792x_mutex_acquire(dev); mt7925_mcu_set_rxfilter(dev, flags, 0, 0); mt792x_mutex_release(dev); diff --git a/mt7925/mcu.c b/mt7925/mcu.c index 1cfc209f..5b9c9d8d 100644 --- a/mt7925/mcu.c +++ b/mt7925/mcu.c @@ -2356,7 +2356,7 @@ int mt7925_mcu_config_sniffer(struct mt792x_vif *vif, .len = cpu_to_le16(sizeof(req.tlv)), .control_ch = chandef->chan->hw_value, .center_ch = ieee80211_frequency_to_channel(freq1), - .drop_err = 1, + .drop_err = !(vif->phy->rxfilter & MT7925_FILTER_FCSFAIL), }, }; diff --git a/mt7925/mt7925.h b/mt7925/mt7925.h index 33782d9b..cc427086 100644 --- a/mt7925/mt7925.h +++ b/mt7925/mt7925.h @@ -7,6 +7,11 @@ #include "../mt792x.h" #include "regs.h" +#define MT7925_FILTER_FCSFAIL BIT(2) +#define MT7925_FILTER_CONTROL BIT(5) +#define MT7925_FILTER_OTHER_BSS BIT(6) +#define MT7925_FILTER_ENABLE BIT(31) + #define MT7925_BEACON_RATES_TBL 25 #define MT7925_TX_RING_SIZE 2048 diff --git a/mt792x.h b/mt792x.h index 9722d840..49c7b695 100644 --- a/mt792x.h +++ b/mt792x.h @@ -214,6 +214,7 @@ struct mt792x_phy { s16 coverage_class; u8 slottime; + u32 rxfilter; u32 rx_ampdu_ts; u32 ampdu_ref;