mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH rtw-next v3 0/2] wifi: rtw88: reduce RTL8822CS SDIO request overhead
@ 2026-11-16 20:57 Leonard Lausen
  2026-11-16 20:57 ` [PATCH rtw-next v3 1/2] wifi: rtw88: 8822c: filter hardware-handled control frames on SDIO Leonard Lausen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Leonard Lausen @ 2026-11-16 20:57 UTC (permalink / raw)
  To: Ping-Ke Shih
  Cc: leonard, Luka Gejak, David Härdeman, Shawn Lin,
	Heiko Stuebner, linux-wireless, linux-rockchip, linux-kernel

Reduce RTL8822CS SDIO request overhead by filtering hardware-handled
control frames and combining adjacent TX-capacity reads.

Changes in v3:
- Include monitor-filter correction in patch 1 as suggested by Luka Gejak.
- Cache the current FIF_CONTROL request even when changed_flags omits it.
- Use a shared filter writer in every chip initializer and both
  beamforming paths, preserving the monitor override and normal default.
- Keep the TX-capacity read optimization unchanged from v2.

On RTL8822CS/NanoPi M5, v2 lost the monitor override after IPS wake and
managed association: REG_RXFLTMAP1 was 0xc5ff instead of 0xffff. V3 kept
0xffff in both cases and restored 0xc5ff after monitor removal. Function
tracing confirmed filter configuration preceded MAC initialization on
IPS wake and both MU beamforming functions ran during association.

TCP medians on the same board with v3, in Mbit/s:

                              Upload   Download
  rtw-next baseline             163.4      247.5
  Both patches                  285.4      277.0

Median upload improved by 74.6% and download by 11.9%. Each configuration used
three 20-second TCP samples per direction on a shared Wi-Fi network,
so throughput can vary. Drivers were built against the running v7.4-rc2
kernel and hot-loaded with the same test-only key-iteration API adaptation
in firmware recovery. The MMC stack stayed unchanged, at 198 MHz SDR104,
with performance governors, SDIO IRQ on CPU4, client on CPU6 and server
on CPU7. Traffic crossed Wi-Fi/AP/Ethernet between endpoints on the board.

Independent v1 tests measured 52% upload and 9% download gains from
filtering alone, and 9% upload and 8% download from combined reads alone.
Adding reads after filtering gave another 11% upload and 4% download.
V1 used v7.4-rc2 plus the RX-bounds and MMC voltage-switch fixes, stock
MMC host limits, four 20-second upload and four 30-second download samples.

All 20 configured rtw88 module objects built on ARM64 with W=1 without
warnings; the runtime build passed modpost. Source-extracted filter tests
with mocked I/O reproduced failures before the correction; all 198 checks
passed with address/undefined-behavior sanitizers after it, including MAC
reset, unchanged flags and beamforming sequences. Actual full-system
restart, suspend/resume, AP operation and other-chip hardware remain
untested.

AI assistance: Codex traced the filter writers, developed the state
correction and regression tests, prepared the messages, and automated
builds and hardware validation. Prompts requested preserving FIF_CONTROL
across initialization, flag replay and beamforming, then retesting.

v2: https://lore.kernel.org/linux-wireless/20261116100804.425592-2-leonard@lausen.nl/T/#t


Leonard Lausen (2):
  wifi: rtw88: 8822c: filter hardware-handled control frames on SDIO
  wifi: rtw88: sdio: combine free TX page register reads

 drivers/net/wireless/realtek/rtw88/bf.c       |  4 +-
 drivers/net/wireless/realtek/rtw88/mac80211.c |  9 +--
 drivers/net/wireless/realtek/rtw88/main.c     | 11 ++++
 drivers/net/wireless/realtek/rtw88/main.h     |  2 +
 drivers/net/wireless/realtek/rtw88/reg.h      |  4 ++
 drivers/net/wireless/realtek/rtw88/rtw8723x.c |  2 +-
 drivers/net/wireless/realtek/rtw88/rtw8814a.c |  2 +-
 drivers/net/wireless/realtek/rtw88/rtw8821c.c |  2 +-
 drivers/net/wireless/realtek/rtw88/rtw8822b.c |  2 +-
 drivers/net/wireless/realtek/rtw88/rtw8822c.c | 12 +++-
 drivers/net/wireless/realtek/rtw88/rtw88xxa.c |  2 +-
 drivers/net/wireless/realtek/rtw88/sdio.c     | 64 +++++++++++++++++--
 drivers/net/wireless/realtek/rtw88/sdio.h     |  1 +
 13 files changed, 99 insertions(+), 18 deletions(-)


base-commit: 61a5eb87b2d9b4d5e353780b781cf691f39ba9e1

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

end of thread, other threads:[~2026-11-16 21:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-16 20:57 [PATCH rtw-next v3 0/2] wifi: rtw88: reduce RTL8822CS SDIO request overhead Leonard Lausen
2026-11-16 20:57 ` [PATCH rtw-next v3 1/2] wifi: rtw88: 8822c: filter hardware-handled control frames on SDIO Leonard Lausen
2026-11-16 20:57 ` [PATCH rtw-next v3 2/2] wifi: rtw88: sdio: combine free TX page register reads Leonard Lausen
2026-11-16 21:46 ` [PATCH rtw-next v3 0/2] wifi: rtw88: reduce RTL8822CS SDIO request overhead Luka Gejak

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®