]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mt76: mt7921: don't disconnect when CSA to DFS chan
authorJanusz Dziedzic <janusz.dziedzic@gmail.com>
Wed, 16 Jul 2025 16:54:01 +0000 (18:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 17:02:18 +0000 (19:02 +0200)
[ Upstream commit 87f38519d27a514c9909f84b8f1334125df9778e ]

When station mode, don't disconnect when we get
channel switch from AP to DFS channel. Most APs
send CSA request after pass background CAC. In other
case we should disconnect after detect beacon miss.

Without patch when we get CSA to DFS channel get:
"kernel: wlo1: preparing for channel switch failed, disconnecting"

Fixes: 8aa2f59260eb ("wifi: mt76: mt7921: introduce CSA support")
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Link: https://patch.msgid.link/20250716165443.28354-1-janusz.dziedzic@gmail.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt7921/main.c

index 77f73ae1d7eccee776547ce31f83d64e0dee35cb..f6b431c422ebc4ea1f6ff9e385f57c0b6f419d13 100644 (file)
@@ -1457,11 +1457,8 @@ static int mt7921_pre_channel_switch(struct ieee80211_hw *hw,
        if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc)
                return -EOPNOTSUPP;
 
-       /* Avoid beacon loss due to the CAC(Channel Availability Check) time
-        * of the AP.
-        */
        if (!cfg80211_chandef_usable(hw->wiphy, &chsw->chandef,
-                                    IEEE80211_CHAN_RADAR))
+                                    IEEE80211_CHAN_DISABLED))
                return -EOPNOTSUPP;
 
        return 0;