Commit 87f38519 authored by Janusz Dziedzic's avatar Janusz Dziedzic Committed by Felix Fietkau
Browse files

wifi: mt76: mt7921: don't disconnect when CSA to DFS chan



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: 8aa2f592 ("wifi: mt76: mt7921: introduce CSA support")
Signed-off-by: default avatarJanusz Dziedzic <janusz.dziedzic@gmail.com>
Link: https://patch.msgid.link/20250716165443.28354-1-janusz.dziedzic@gmail.com


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 87b07a1f
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1459,11 +1459,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;