Commit e8be626d authored by Felix Fietkau's avatar Felix Fietkau Committed by Kalle Valo

mt76x2: configure rx filter based on monitor mode setting

Due to an unrelated issue, the MT_RX_FILTR_CFG_PROMISC flag is currently
unset, which means that monitor mode is unconditionally enabled.
Toggle this flag based on the mac80211 monitor mode setting instead
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent eb46e5b7
...@@ -152,6 +152,15 @@ mt76x2_config(struct ieee80211_hw *hw, u32 changed) ...@@ -152,6 +152,15 @@ mt76x2_config(struct ieee80211_hw *hw, u32 changed)
mutex_lock(&dev->mutex); mutex_lock(&dev->mutex);
if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
if (!(hw->conf.flags & IEEE80211_CONF_MONITOR))
dev->rxfilter |= MT_RX_FILTR_CFG_PROMISC;
else
dev->rxfilter &= ~MT_RX_FILTR_CFG_PROMISC;
mt76_wr(dev, MT_RX_FILTR_CFG, dev->rxfilter);
}
if (changed & IEEE80211_CONF_CHANGE_POWER) { if (changed & IEEE80211_CONF_CHANGE_POWER) {
dev->txpower_conf = hw->conf.power_level * 2; dev->txpower_conf = hw->conf.power_level * 2;
......
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