]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mt76: mt7915: Fix mesh scan on MT7916 DBDC
authorNicolas Cavallari <nicolas.cavallari@green-communications.fr>
Fri, 27 Sep 2024 08:53:17 +0000 (10:53 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 13 Jan 2025 10:21:54 +0000 (11:21 +0100)
commit c4f075582304 ("wifi: mt76: mt7915: fix command timeout in AP stop
period") changes the behavior of mt7915_bss_info_changed() in mesh mode
when enable_beacon becomes false: it calls mt7915_mcu_add_bss_info(...,
false) and mt7915_mcu_add_sta(..., false) while the previous code
didn't.  These sends mcu commands that apparently confuse the firmware.

This breaks scanning while in mesh mode on AsiaRF MT7916 DBDC-based cards:
scanning works but no mesh frames get sent afterwards and the firmware
seems to be hosed.  It breaks on MT7916 DBDC but not on MT7915 DBDC.

Fixes: c4f075582304 ("wifi: mt76: mt7915: fix command timeout in AP stop period")
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Link: https://patch.msgid.link/20240927085350.4594-1-nicolas.cavallari@green-communications.fr
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/main.c

index c6f498fc81ffdc4febb655cec6f191d2121d1c6b..8183708a9b3552b0a5877be49a9f4695c8a7ef46 100644 (file)
@@ -619,8 +619,9 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
        if (changed & BSS_CHANGED_ASSOC)
                set_bss_info = vif->cfg.assoc;
        if (changed & BSS_CHANGED_BEACON_ENABLED &&
+           info->enable_beacon &&
            vif->type != NL80211_IFTYPE_AP)
-               set_bss_info = set_sta = info->enable_beacon;
+               set_bss_info = set_sta = 1;
 
        if (set_bss_info == 1)
                mt7915_mcu_add_bss_info(phy, vif, true);