[PATCH 4/4] wifi: ath9k: skip the departing channel's noise floor on USB fast changes
From: Nerijus Bendžiūnas
Date: Sat Aug 29 2026 - 01:46:40 EST
ath9k_hw_reset() reads the noise floor of the channel it is leaving so
that channel's calibration history stays current. The readout is several
register reads, which on the USB devices are as many synchronous WMI
round trips, and a frequency-hopping monitor pays them on every hop for
a value that only matters if the radio returns to that channel later.
Leave the readout out when a fast channel change is asked for on a USB
device. Periodic calibration refreshes the history while a channel is in
use, and the arriving channel's noise floor is loaded either way, so
only a channel that is left and revisited without calibrating in between
sees an older history.
Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@xxxxxxxxx>
---
drivers/net/wireless/ath/ath9k/hw.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index d204cdf3fa8f..64fefbec46d5 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1878,7 +1878,13 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
return -EIO;
- if (ah->curchan && !ah->chip_fullsleep)
+ /*
+ * Over USB the departing channel's noise-floor readout costs several
+ * round trips and only feeds its history; the fast path reloads the
+ * arriving channel's noise floor regardless.
+ */
+ if (ah->curchan && !ah->chip_fullsleep &&
+ !(fastcc && common->bus_ops->ath_bus_type == ATH_USB))
ath9k_hw_getnf(ah, ah->curchan);
ah->caldata = caldata;
--
2.55.0