Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Gaston Guevara <guevara.gaston@gmail.com>,
	linux-wireless@vger.kernel.org
Cc: Gaston Guevara <guevara.gaston@gmail.com>
Subject: Re: [PATCH ath-next] wifi: ath9k: don't check CSA completion on station interfaces
Date: Mon, 23 Nov 2026 22:47:18 +0100	[thread overview]
Message-ID: <87bj7fdxuh.fsf@toke.dk> (raw)
In-Reply-To: <20261123210815.25770-1-guevara.gaston@gmail.com>

Gaston Guevara <guevara.gaston@gmail.com> writes:

> ath9k_csa_update() iterates over all active interfaces and calls
> ath9k_csa_is_finished() for each of them. mac80211 also sets
> bss_conf.csa_active on a station interface while it follows a channel
> switch announced by its AP, so when an AP and a station share an ath9k
> radio, ath9k_csa_is_finished() calls ieee80211_beacon_cntdwn_is_complete()
> for the station vif. That function only handles AP, ad-hoc and mesh
> interfaces and hits WARN_ON(1) for any other type, producing a burst of
> warnings (about one per beacon interval) on every upstream CSA.
>
> Skip station interfaces in ath9k_csa_is_finished(). Ad-hoc and mesh
> interfaces keep their current behaviour.
>
> Tested on a TP-Link Archer C60 v3 (QCA9561) with an AP and a station
> on the same radio: twelve consecutive upstream channel switches with
> no warnings, whereas every logged switch produced them before.
>
> Fixes: 4effc6fda7ab ("ath9k: prepare for multi-interface CSA support")
> Link: https://lore.kernel.org/linux-wireless/CABMxrRyvsFy7qGXky-OF1KE3c04z0xO_XMGnJC28L0WHE9AF9Q@mail.gmail.com/
> Signed-off-by: Gaston Guevara <guevara.gaston@gmail.com>
> ---
>  drivers/net/wireless/ath/ath9k/beacon.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
> index 4a27e3753c03..ff72f231be5d 100644
> --- a/drivers/net/wireless/ath/ath9k/beacon.c
> +++ b/drivers/net/wireless/ath/ath9k/beacon.c
> @@ -362,7 +362,8 @@ static void ath9k_set_tsfadjust(struct ath_softc *sc,
>  
>  bool ath9k_csa_is_finished(struct ath_softc *sc, struct ieee80211_vif *vif)
>  {
> -	if (!vif || !vif->bss_conf.csa_active)
> +	if (!vif || vif->type == NL80211_IFTYPE_STATION ||
> +	    !vif->bss_conf.csa_active)

Hmm, actually, now that I think about this some more, I think it's
better to move this check out to the caller (in ath9k_csa_update_vif()).
If we ever do get called through the non-iteration path with a wrong
interface type, we want to hear about it through the WARN_ON.

-Toke

pw-bot: cr

      reply	other threads:[~2026-11-23 21:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22 21:30 [BUG] ath9k: WARN in ieee80211_beacon_cntdwn_is_complete() on every CSA when AP and STA share a radio (ath9k_csa_update() visits the STA vif) Gaston Guevara
2026-11-23 15:40 ` Toke Høiland-Jørgensen
2026-11-23 21:08   ` [PATCH ath-next] wifi: ath9k: don't check CSA completion on station interfaces Gaston Guevara
2026-11-23 21:47     ` Toke Høiland-Jørgensen [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=87bj7fdxuh.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=guevara.gaston@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /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