Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH rtw-next 0/2] wifi: rtl8xxxu: fix two retry count overflows
@ 2026-11-27 18:53 Ahmet Zeren via B4 Relay
  2026-11-27 18:53 ` [PATCH rtw-next 1/2] wifi: rtl8xxxu: limit max_rate_tries to what mac80211 can pass Ahmet Zeren via B4 Relay
  2026-11-27 18:53 ` [PATCH rtw-next 2/2] wifi: rtl8xxxu: limit the retry count in the TX report Ahmet Zeren via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Ahmet Zeren via B4 Relay @ 2026-11-27 18:53 UTC (permalink / raw)
  To: Ping-Ke Shih, Jes Sorensen; +Cc: linux-wireless, Luka Gejak, Ahmet Zeren

The retry count in mac80211's struct ieee80211_tx_rate is only 5 bits
wide, and rtl8xxxu overflows it in two places: max_rate_tries is set to
64, and the TX report passes up to 64 tries. I found these while porting
the injection changes to rtw88, as mentioned in the rtw88 thread.

Tested on RTL8192CU (0bda:8178) on 2.4 GHz, with injected frames to an
absent station and the retry count from the TX report:

                         before   after
  31 requested retries     16       30
  40 requested retries      8       30
  default limit (48)       16       30

(before, 31 retries fell back to the default limit, which the TX report
showed as 16.) checkpatch --strict, W=1 and sparse are clean.

AI tool use (Documentation/process/generated-content.rst): the patches
were written with help from Claude Code (Claude Opus 5.5). It was asked
to fix the overflow found in review and test the boundary values on
the RTL8192CU; that test showed the second one. I have reviewed and
tested the changes and take responsibility for them.

---
Ahmet Zeren (2):
      wifi: rtl8xxxu: limit max_rate_tries to what mac80211 can pass
      wifi: rtl8xxxu: limit the retry count in the TX report

 drivers/net/wireless/realtek/rtl8xxxu/core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
base-commit: ae6b9e98b9045e47f609ec2a8197a3f3109627cb
change-id: 20261127-b4-rtl8xxxu-retry-b98ae3a5e5ad

Best regards,
--  
Ahmet Zeren <niko3x@proton.me>



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

end of thread, other threads:[~2026-11-30  2:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 18:53 [PATCH rtw-next 0/2] wifi: rtl8xxxu: fix two retry count overflows Ahmet Zeren via B4 Relay
2026-11-27 18:53 ` [PATCH rtw-next 1/2] wifi: rtl8xxxu: limit max_rate_tries to what mac80211 can pass Ahmet Zeren via B4 Relay
2026-11-30  2:11   ` Ping-Ke Shih
2026-11-27 18:53 ` [PATCH rtw-next 2/2] wifi: rtl8xxxu: limit the retry count in the TX report Ahmet Zeren via B4 Relay
2026-11-30  2:14   ` Ping-Ke Shih

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