Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 0/2] wifi: ath9k_htc: cope with lost WMI reads
@ 2026-09-03 17:00 Nerijus Bendžiūnas
  2026-09-03 17:00 ` [PATCH 1/2] wifi: ath9k_htc: derive the PHY error filter bits from software state Nerijus Bendžiūnas
  2026-09-03 17:00 ` [PATCH 2/2] wifi: ath9k_htc: count WMI timeouts and length-discarded frames Nerijus Bendžiūnas
  0 siblings, 2 replies; 3+ messages in thread
From: Nerijus Bendžiūnas @ 2026-09-03 17:00 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, linux-wireless; +Cc: linux-kernel

On the USB devices every register read is a WMI round trip that can
time out, and ath9k_regread() reports a timeout as -1, indistinguishable
from an all-ones register. Two patches already on the list deal with
the reads that did the most damage: the spectral trigger no longer reads
the filter back, and a timed-out multi-read reports all ones like a
single read does. These two finish the job on the receive side.

Patch 1 stops ath9k_htc_calcrxfilter() reading AR_RX_FILTER back to
find out whether a spectral scan set the PHY error bits. The driver
knows that already, so it sets them from spec_priv, one round trip less
per filter recalculation, and a timed-out read can no longer switch PHY
error forwarding on by itself.

Patch 2 adds the two counters that were missing while all of this was
being tracked down on a stock kernel: WMI commands sent and timed out,
in a new debugfs file, and frames the receive path discards for their
length, in the LENGTH-ERR line that recv already prints for ath9k.


Nerijus Bendžiūnas (2):
  wifi: ath9k_htc: derive the PHY error filter bits from software state
  wifi: ath9k_htc: count WMI timeouts and length-discarded frames

 drivers/net/wireless/ath/ath9k/htc.h          |  2 ++
 .../net/wireless/ath/ath9k/htc_drv_debug.c    | 25 +++++++++++++++++++
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 15 +++++------
 drivers/net/wireless/ath/ath9k/wmi.c          |  2 ++
 drivers/net/wireless/ath/ath9k/wmi.h          |  2 ++
 5 files changed, 39 insertions(+), 7 deletions(-)


base-commit: ca800a9302764c445de0da0e84d2252400a770ee
-- 
2.55.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-03 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 17:00 [PATCH 0/2] wifi: ath9k_htc: cope with lost WMI reads Nerijus Bendžiūnas
2026-09-03 17:00 ` [PATCH 1/2] wifi: ath9k_htc: derive the PHY error filter bits from software state Nerijus Bendžiūnas
2026-09-03 17:00 ` [PATCH 2/2] wifi: ath9k_htc: count WMI timeouts and length-discarded frames Nerijus Bendžiūnas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox