From: Mehmet Fide <mehmet.fide@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Luka Gejak <luka.gejak@linux.dev>,
Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
mehmet.fide@screeningeagle.com
Subject: [PATCH ath-current] wifi: ath9k_htc: clear csa_vif when a switch is aborted
Date: Mon, 26 Oct 2026 16:25:37 +0100 [thread overview]
Message-ID: <20261026152537.1272836-1-mehmet.fide@gmail.com> (raw)
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
reply other threads:[~2026-10-26 15:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261026152537.1272836-1-mehmet.fide@gmail.com \
--to=mehmet.fide@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luka.gejak@linux.dev \
--cc=mehmet.fide@screeningeagle.com \
--cc=toke@toke.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®