[PATCH rtw-next v4 0/3] wifi: rtl8xxxu: keep RX requests available across transient errors

From: Kim Wooseok via B4 Relay

Date: Mon Sep 21 2026 - 04:07:45 EST


rtl8xxxu keeps 32 RX URBs in circulation. Completed requests wait on a
pending list until more than eight are ready for resubmission. Completion
errors free their URBs, so a finite run of errors can leave too few
requests to reach that threshold. Reception can then remain stopped
after the errors end.

This series preserves those requests across recoverable errors. It also
fixes an skb leak after failed submission and startup error paths that
leave requests active or report success after only part of the pool was
allocated.

Normal completions and recoverable failures use one pending list and
one delayed work item. Errors schedule a retry with a 100 ms delay.
When a normal completion takes the pending count above eight,
mod_delayed_work(..., 0) brings the work forward. The delay limits
repeated retries when normal reception is not progressing; it is not a
minimum wait for each URB. ENOMEM/EAGAIN during submission uses the same
retry path.

I designed the v3 tests around the error paths changed by this series
and exercised them on an RTL8192EU with the RX changes backported to the
Pi's 6.18.46 RT kernel. I checked resource cleanup and reception after
recovery and restart.

With the same 24 injected EPROTO completions, the unpatched driver
stopped with eight pending URBs and none in flight. V3 retained all 32
and received 1,225 packets in 30 seconds without restarting the
interface.

For the changes in v4, I rebuilt the driver with W=1 after patches 2
and 3 using the existing ARM64 build configuration. Both builds passed
without warnings. All three patches pass strict checkpatch and apply
in order to the base commit.

Assisted-by: GPT-6 Astra
Signed-off-by: Kim Wooseok <5mghybrid@xxxxxxxxx>

---
Changes in v4:
- Leave patch 1 unchanged and add Ping-Ke's Reviewed-by to patch 2.
- Initialize the RX worker's priv pointer at declaration and add the
requested blank lines.
- Rename the queue helper's retry argument to defer_schedule.
- Use schedule_delayed_work() for delayed retries. Keep
mod_delayed_work() to advance pending work on normal completions,
using system_percpu_wq instead of system_wq.
- Link to v3: https://lore.kernel.org/linux-wireless/20260920-codex-rtl-rx-v3-submit-v3-0-883d11351963@xxxxxxxxx/

---
Kim Wooseok (3):
wifi: rtl8xxxu: free RX skb when URB submission fails
wifi: rtl8xxxu: unwind incomplete receive startup
wifi: rtl8xxxu: preserve RX requests across recoverable transfer errors

drivers/net/wireless/realtek/rtl8xxxu/core.c | 154 +++++++++++++----------
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +-
2 files changed, 87 insertions(+), 69 deletions(-)
---
base-commit: 73e3b1c94c7d5b4a113e7cbb42665dc2fe3b9d78
change-id: 20260920-codex-rtl-rx-v3-submit-1b4ea6921111

Best regards,
--
Kim Wooseok <5mghybrid@xxxxxxxxx>