At the start of a CSA, __ieee80211_channel_switch() reports BSS_CHANGED_BEACON with csa_active set and then calls .channel_switch_beacon. mt7915_bss_info_changed() and mt7915_channel_switch_beacon() thus both upload the same CSA beacon, and each upload passes the initial count of the template to the firmware. Drop mt7915_channel_switch_beacon(). mac80211 calls it only after a BSS_CHANGED_BEACON report, so mt7915_bss_info_changed() already uploads the CSA beacon, like mt7996 does. Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c index 556f8948abac..8cf7fde1a197 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c @@ -737,18 +737,6 @@ mt7915_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, mutex_unlock(&dev->mt76.mutex); } -static void -mt7915_channel_switch_beacon(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct cfg80211_chan_def *chandef) -{ - struct mt7915_dev *dev = mt7915_hw_dev(hw); - - mutex_lock(&dev->mt76.mutex); - mt7915_mcu_add_beacon(hw, vif, true, BSS_CHANGED_BEACON); - mutex_unlock(&dev->mt76.mutex); -} - int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif, struct ieee80211_sta *sta) { @@ -1803,7 +1791,6 @@ const struct ieee80211_ops mt7915_ops = { .release_buffered_frames = mt76_release_buffered_frames, .get_txpower = mt76_get_txpower, .set_sar_specs = mt7915_set_sar_specs, - .channel_switch_beacon = mt7915_channel_switch_beacon, .get_stats = mt7915_get_stats, .get_et_sset_count = mt7915_get_et_sset_count, .get_et_stats = mt7915_get_et_stats, -- 2.47.3