From: Mehmet Fide <mehmet.fide@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
mehmet.fide@screeningeagle.com
Subject: Re: [PATCH ath-next] wifi: ath9k_htc: do not fetch the beacon of a finished countdown
Date: Tue, 17 Nov 2026 13:26:48 +0100 [thread overview]
Message-ID: <20261117122648.1731207-1-mehmet.fide@gmail.com> (raw)
In-Reply-To: <87fqwzu54e.fsf@toke.dk>
Hi Toke,
> if (ath9k_htc_csa_is_finished(priv))
> return;
That would skip one beacon at most. ath9k_htc_csa_is_finished() clears
csa_vif when it calls ieee80211_csa_finish(), but csa_active stays set
until the second round of __ieee80211_csa_finalize(), after the channel
change, and ath9k_htc_set_channel() turns beaconing back on in between.
The next SWBA finds csa_vif NULL and fetches the CSA beacon again.
On an AR9271 AP, with a sniffer on each channel counting CSA beacons
heard on the new channel, in 120 switches: 3 without a change, 5 with
the early return, 1 with this patch.
The one left comes from mac80211. __ieee80211_csa_finalize() clears
csa_active before ieee80211_set_after_csa_beacon() replaces the CSA
beacon, and ieee80211_beacon_get() still counts that beacon down, so an
SWBA in between passes the csa_active test and gets the old beacon.
With a print added: 3 such fetches in 200 switches, the same 3 beacons
on the air. ath9k_csa_is_finished() has the same window.
Dropping the csa_active test here would close it, but
ieee80211_beacon_cntdwn_is_complete() warns when the AP has no beacon,
and ieee80211_stop_ap() removes it before beaconing is disabled. So I'd
rather fix the order in mac80211 in a separate patch. Does that sound
right to you?
On csa_vif: remove_interface, bss_info_changed and
channel_switch_beacon all run under the wiphy mutex; only the WMI
tasklet does not, as wmi_lock is dropped before the SWBA is handled.
250 back-to-back switches and 25 AP stops in a countdown showed no
problem.
Mehmet
prev parent reply other threads:[~2026-11-17 12:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 12:34 [PATCH ath-next] wifi: ath9k_htc: do not fetch the beacon of a finished countdown Mehmet Fide
2026-11-17 10:25 ` Toke Høiland-Jørgensen
2026-11-17 12:26 ` Mehmet Fide [this message]
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=20261117122648.1731207-1-mehmet.fide@gmail.com \
--to=mehmet.fide@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mehmet.fide@screeningeagle.com \
--cc=toke@toke.dk \
--cc=yeohchunyeow@gmail.com \
/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