mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nerijus Bendžiūnas" <nerijus.bendziunas@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	"John W . Linville" <linville@tuxdriver.com>,
	Simon Wunderlich <sw@simonwunderlich.de>,
	Oleksij Rempel <linux@rempel-privat.de>,
	Kalle Valo <kvalo@kernel.org>,
	Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
	stable@vger.kernel.org
Subject: [PATCH ath-next v4 0/8] wifi: ath9k: fix register access and spectral scan filter handling on ath9k_htc
Date: Wed, 16 Sep 2026 20:34:21 +0300	[thread overview]
Message-ID: <20260916173429.403889-1-nerijus.bendziunas@gmail.com> (raw)

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


             reply	other threads:[~2026-09-16 17:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 17:34 Nerijus Bendžiūnas [this message]
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

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=20260916173429.403889-1-nerijus.bendziunas@gmail.com \
    --to=nerijus.bendziunas@gmail.com \
    --cc=jeff.johnson@oss.qualcomm.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=linville@tuxdriver.com \
    --cc=stable@vger.kernel.org \
    --cc=sw@simonwunderlich.de \
    --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

all inboxes | Powered by JetHome®