From: Nick Hainke <vincent@systemli.org>
To: linux-wireless@vger.kernel.org
Cc: "Nick Hainke" <vincent@systemli.org>,
"Toke Høiland-Jørgensen" <toke@toke.dk>,
linux-kernel@vger.kernel.org
Subject: [PATCH] wifi: ath9k: restore background spectral scan after reset
Date: Tue, 15 Sep 2026 21:43:27 +0200 [thread overview]
Message-ID: <20260915194327.30397-1-vincent@systemli.org> (raw)
A reset leaves spectral_mode set to SPECTRAL_BACKGROUND, but resets the
spectral registers and receive filter. The driver therefore still reports
a background scan even though the hardware no longer produces FFT samples.
Re-trigger background spectral scanning after reset recovery so the
software and hardware state match again. Do not re-trigger spectral
scanning in disabled, manual, channel-scan, radar, or off-channel modes.
Assisted-by: Claude:opus-5
Signed-off-by: Nick Hainke <vincent@systemli.org>
---
drivers/net/wireless/ath/ath9k/main.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 740a6fc7b067..00e587fe6ee3 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -231,6 +231,17 @@ static bool ath_prepare_reset(struct ath_softc *sc)
return ret;
}
+static void ath_restore_spectral_scan(struct ath_softc *sc, bool start)
+{
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+
+ if (!start || sc->cur_chan->offchannel || sc->hw->conf.radar_enabled ||
+ sc->spec_priv.spectral_mode != SPECTRAL_BACKGROUND)
+ return;
+
+ ath9k_cmn_spectral_scan_trigger(common, &sc->spec_priv);
+}
+
static bool ath_complete_reset(struct ath_softc *sc, bool start)
{
struct ath_hw *ah = sc->sc_ah;
@@ -269,6 +280,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
ath_restart_work(sc);
ath_txq_schedule_all(sc);
}
+ ath_restore_spectral_scan(sc, start);
sc->gtt_cnt = 0;
--
2.55.0
next reply other threads:[~2026-09-15 19:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 19:43 Nick Hainke [this message]
2026-10-13 17:56 ` [PATCH] wifi: ath9k: restore background spectral scan after reset nick
2026-10-19 18:46 ` Toke Høiland-Jørgensen
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=20260915194327.30397-1-vincent@systemli.org \
--to=vincent@systemli.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--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