diff options
author | Ryder Lee <ryder.lee@mediatek.com> | 2021-03-25 11:06:04 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-12 01:03:05 +0300 |
commit | d9852ab2f362fc4fcf501f4350d007b08559ccc1 (patch) | |
tree | 4f3697d6ee4ba33c3ab5e0cd8e8d4543a2105447 /drivers/net/wireless/mediatek/mt76/mt7615/main.c | |
parent | ad2a1ea49f631bb739116e9839b6f65231053112 (diff) | |
download | linux-d9852ab2f362fc4fcf501f4350d007b08559ccc1.tar.xz |
mt76: mt7615: keep mcu_add_bss_info enabled till interface removal
BSS_INFO_BASIC is never called alone with inactive state, which always
follows beacon offload disable, so keep it enabled throughout interfaces
life cycle. Inactive state also removes sta record of all connected
stations, thurs causes connection lost which defeats the purpose of CSA.
Lastly, this is especially an unexpected behavior that keeping mt7622
failing beacon buffer recyled when scanning channels.
bss_conf change is updated with active state only, so just overwrite it.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/main.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c index 342e2c5d9766..e30b256784e0 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c @@ -253,10 +253,11 @@ static void mt7615_remove_interface(struct ieee80211_hw *hw, struct mt7615_phy *phy = mt7615_hw_phy(hw); int idx = msta->wcid.idx; - /* TODO: disable beacon for the bss */ - mt7615_mutex_acquire(dev); + mt7615_mcu_add_bss_info(phy, vif, NULL, false); + mt7615_mcu_sta_add(phy, vif, NULL, false); + mt76_testmode_reset(phy->mt76, true); if (vif == phy->monitor_vif) phy->monitor_vif = NULL; @@ -558,11 +559,11 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw, } } - if (changed & BSS_CHANGED_BEACON_ENABLED) { - mt7615_mcu_add_bss_info(phy, vif, NULL, info->enable_beacon); - mt7615_mcu_sta_add(phy, vif, NULL, info->enable_beacon); + if (changed & BSS_CHANGED_BEACON_ENABLED && info->enable_beacon) { + mt7615_mcu_add_bss_info(phy, vif, NULL, true); + mt7615_mcu_sta_add(phy, vif, NULL, true); - if (vif->p2p && info->enable_beacon) + if (vif->p2p) mt7615_mcu_set_p2p_oppps(hw, vif); } |