Commit 4bec61d9 authored by Sean Wang's avatar Sean Wang Committed by Felix Fietkau

mt76: mt7663: fix when beacon filter is being applied

HW beacon filter command is being applied until we're in associated state
because the command would rely on the associated access point's beacon
interval and DTIM information.

Fixes: 7124198a ("mt76: mt7615: enable beacon filtering by default for offload fw")
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent c3800cc2
...@@ -238,8 +238,6 @@ static int mt7615_add_interface(struct ieee80211_hw *hw, ...@@ -238,8 +238,6 @@ static int mt7615_add_interface(struct ieee80211_hw *hw,
ret = mt7615_mcu_add_dev_info(phy, vif, true); ret = mt7615_mcu_add_dev_info(phy, vif, true);
if (ret) if (ret)
goto out; goto out;
mt7615_mac_set_beacon_filter(phy, vif, true);
out: out:
mt7615_mutex_release(dev); mt7615_mutex_release(dev);
...@@ -265,7 +263,6 @@ static void mt7615_remove_interface(struct ieee80211_hw *hw, ...@@ -265,7 +263,6 @@ static void mt7615_remove_interface(struct ieee80211_hw *hw,
mt76_connac_free_pending_tx_skbs(&dev->pm, &msta->wcid); mt76_connac_free_pending_tx_skbs(&dev->pm, &msta->wcid);
mt7615_mac_set_beacon_filter(phy, vif, false);
mt7615_mcu_add_dev_info(phy, vif, false); mt7615_mcu_add_dev_info(phy, vif, false);
rcu_assign_pointer(dev->mt76.wcid[idx], NULL); rcu_assign_pointer(dev->mt76.wcid[idx], NULL);
...@@ -579,6 +576,9 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw, ...@@ -579,6 +576,9 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_ARP_FILTER) if (changed & BSS_CHANGED_ARP_FILTER)
mt7615_mcu_update_arp_filter(hw, vif, info); mt7615_mcu_update_arp_filter(hw, vif, info);
if (changed & BSS_CHANGED_ASSOC)
mt7615_mac_set_beacon_filter(phy, vif, info->assoc);
mt7615_mutex_release(dev); mt7615_mutex_release(dev);
} }
......
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