mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH ath-next v4 0/8] wifi: ath9k: fix register access and spectral scan filter handling on ath9k_htc
@ 2026-09-16 17:34 Nerijus Bendžiūnas
  2026-09-16 17:34 ` [PATCH ath-next v4 1/8] wifi: ath9k: return an error from a failed multi-register read Nerijus Bendžiūnas
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Nerijus Bendžiūnas @ 2026-09-16 17:34 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen
  Cc: linux-wireless, linux-kernel, John W . Linville,
	Simon Wunderlich, Oleksij Rempel, Kalle Valo, Jeff Johnson,
	stable

Eight fixes for the AR9271 USB driver, resent as one series in
dependency order as requested.

Patch 1 gives the multi-register read a return value and checks it.

Patches 2 and 3 belong together: 2 fixes the byte count of a full
read-modify-write flush, which has truncated the AR9271 PA calibration
since the buffer was added, and caps the buffer at 14 entries because
the corrected 15-entry command fills whole USB packets and is never
delivered; 3 refuses any such command.

Patches 4, 5 and 8 are one bug family: a timed-out register read
returns all ones, and the spectral scan wrote it back into the RX
filter (4); disabling the scan never cleared the PHY error bits (5);
the ath9k_htc filter recalculation read the same registers back (8).
5 needs 4's helper, 8 needs both. 8 has a Fixes tag but no stable tag:
the failure has not been seen on that path.

Patch 6 fixes an out-of-bounds write in the shared spectral code on
ath9k_htc. Patch 7 passes CRC-tagged spectral samples to the FFT
parser, which the firmware reports as CRC errors. Both stand alone.

Testing, all on AR9271; ath9k (PCI) is build-tested only:

  1: build; a timed-out multi-read was not provoked.
  2, 3: 100 interface opens on two devices, also on the stock
     firmware, no hang; the size fix without the cap hangs the device
     on the first open.
  4: with a read fault injected the filter stays closed.
  5: PHY error frames after a scan is disabled fall from about 2000/s
     to tens/s.
  6: a 7 hour scan soak with no memory corruption where the unpatched
     driver faulted within a minute.
  7: about 24 % more spectral samples per second at baseline.
  8: filter recalculation issues no reads; the timeout it guards
     against was not provoked.
  All eight, on the series as sent: 965 interface up/down cycles with
     spectral bursts, then 5 hours of continuous scanning under a
     900 frame/s injected load; 657,426 WMI commands and 5,808
     multi-register reads, none failed; taint unchanged.

Not in this series: the acked -EBUSY guard for spectral scan control
while the hardware is disabled, and the ath9k_htc debugfs counters and
round-trip work, which follow once these fixes are in.

Changes since the separate threads: patch 1 returns the error instead
of filling the buffer with all ones, patch 3 returns -EMSGSIZE,
kernel-doc for the RX filter helpers and no other code comments, one
base, the git-blame authors on Cc, shorter commit messages, and the
Assisted-by trailer in the documented form.

Nerijus Bendžiūnas (8):
  wifi: ath9k: return an error from a failed multi-register read
  wifi: ath9k_htc: fix the byte count of a full RMW buffer flush
  wifi: ath9k_htc: refuse a command that fills whole USB packets
  wifi: ath9k: stop a failed register read from opening the RX filter
  wifi: ath9k: clear the PHY error filter when a spectral scan is
    disabled
  wifi: ath9k: count spectral samples in the driver's own RX stats
  wifi: ath9k_htc: pass CRC-tagged spectral samples to the FFT parser
  wifi: ath9k_htc: derive the PHY error filter bits from software state

 drivers/net/wireless/ath/ath.h                |  2 +-
 drivers/net/wireless/ath/ath9k/ani.c          |  4 +-
 .../net/wireless/ath/ath9k/common-spectral.c  | 41 +++++++++++------
 .../net/wireless/ath/ath9k/common-spectral.h  | 10 +++-
 drivers/net/wireless/ath/ath9k/debug.c        |  3 +-
 drivers/net/wireless/ath/ath9k/eeprom.c       | 10 ++--
 drivers/net/wireless/ath/ath9k/eeprom.h       |  2 +-
 drivers/net/wireless/ath/ath9k/eeprom_4k.c    |  4 +-
 drivers/net/wireless/ath/ath9k/eeprom_9287.c  |  7 ++-
 drivers/net/wireless/ath/ath9k/eeprom_def.c   |  5 +-
 drivers/net/wireless/ath/ath9k/hif_usb.c      |  7 +++
 .../net/wireless/ath/ath9k/htc_drv_debug.c    |  3 +-
 drivers/net/wireless/ath/ath9k/htc_drv_init.c |  9 ++--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 41 ++++++++++++++---
 drivers/net/wireless/ath/ath9k/hw.c           | 46 +++++++++++++++++++
 drivers/net/wireless/ath/ath9k/hw.h           |  2 +
 drivers/net/wireless/ath/ath9k/init.c         |  6 ++-
 drivers/net/wireless/ath/ath9k/wmi.h          |  2 +-
 18 files changed, 156 insertions(+), 48 deletions(-)


base-commit: c3bace8584ca707e34ba837f65c2e9d566af4c2c
-- 
2.55.0


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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 17:34 [PATCH ath-next v4 0/8] wifi: ath9k: fix register access and spectral scan filter handling on ath9k_htc Nerijus Bendžiūnas
2026-09-16 17:34 ` [PATCH ath-next v4 1/8] wifi: ath9k: return an error from a failed multi-register read Nerijus Bendžiūnas
2026-09-16 17:34 ` [PATCH ath-next v4 2/8] wifi: ath9k_htc: fix the byte count of a full RMW buffer flush Nerijus Bendžiūnas
2026-09-16 17:34 ` [PATCH ath-next v4 3/8] wifi: ath9k_htc: refuse a command that fills whole USB packets Nerijus Bendžiūnas
2026-09-16 17:34 ` [PATCH ath-next v4 4/8] wifi: ath9k: stop a failed register read from opening the RX filter Nerijus Bendžiūnas
2026-09-16 17:34 ` [PATCH ath-next v4 5/8] wifi: ath9k: clear the PHY error filter when a spectral scan is disabled Nerijus Bendžiūnas
2026-09-16 17:34 ` [PATCH ath-next v4 6/8] wifi: ath9k: count spectral samples in the driver's own RX stats Nerijus Bendžiūnas
2026-09-16 17:34 ` [PATCH ath-next v4 7/8] wifi: ath9k_htc: pass CRC-tagged spectral samples to the FFT parser Nerijus Bendžiūnas
2026-09-16 17:34 ` [PATCH ath-next v4 8/8] wifi: ath9k_htc: derive the PHY error filter bits from software state 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

all inboxes | Powered by JetHome®