mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH ath-current] wifi: ath9k_htc: clear csa_vif when a switch is aborted
@ 2026-10-26 15:25 Mehmet Fide
  0 siblings, 0 replies; only message in thread
From: Mehmet Fide @ 2026-10-26 15:25 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen
  Cc: Luka Gejak, Johannes Berg, linux-wireless, linux-kernel, mehmet.fide

From: Mehmet Fide <mehmet.fide@screeningeagle.com>

priv->csa_vif is cleared only when the countdown completes or the
interface is removed. When mac80211 aborts a switch and stops
beaconing, as ieee80211_stop_ap() and ieee80211_stop_mesh() do, it
stays set, and the next switch on the interface hits the WARN_ON() in
ath9k_htc_channel_switch_beacon().

Clear it when beaconing stops and the switch is no longer active.
Off channel, beaconing stops with the switch still active and the
countdown continues afterwards, so keep it then.

Fixes: f0e449627e4a ("ath9k_htc: add support of channel switch")
Reported-by: Luka Gejak <luka.gejak@linux.dev>
Closes: https://lore.kernel.org/linux-wireless/c8bc5affa75d7519b424ea98c07c1d6b65942347@linux.dev/
Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>
---

Notes:
    Tested on an AR9271 (firmware 1.4), 6.12.114, also with PROVE_LOCKING
    and DEBUG_ATOMIC_SLEEP. A mesh point left during its countdown and
    joined again hit the WARN on the next switch 3/3 before, 0/8 after. An
    IBSS does the same with [1] applied: 13/13 before, 0/35 after. A scan
    during an IBSS countdown still lets the switch complete (24/24).
    
    [1] https://lore.kernel.org/linux-wireless/20261025193615.1123718-1-mehmet.fide@gmail.com/

 drivers/net/wireless/ath/ath9k/htc_drv_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 0d6272ac0dac..8080fff765e9 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1569,6 +1569,9 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
 			priv->cur_beacon_conf.enable_beacon = 0;
 			ath9k_htc_beacon_config(priv, vif);
 		}
+
+		if (priv->csa_vif == vif && !bss_conf->csa_active)
+			priv->csa_vif = NULL;
 	}
 
 	if (changed & BSS_CHANGED_BEACON_INT) {

base-commit: 9d8ec0b5b5295bd23d979d1b2b905de25c36fff2
-- 
2.55.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-26 15:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 15:25 [PATCH ath-current] wifi: ath9k_htc: clear csa_vif when a switch is aborted Mehmet Fide

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®