[PATCH RFT rtw-next 0/2] wifi: rtw88: honour rate, retries and bandwidth of injected frames

From: Ahmet Zeren via B4 Relay

Date: Tue Nov 24 2026 - 03:32:52 EST


rtw88 ignores most of the radiotap header of injected frames: the
firmware rate adaptation picks the rate, the frames are sent at 20 MHz,
and the radiotap retry count and NO_ACK have no effect. The same was
recently fixed in rtw89, and Ping-Ke agreed to take similar patches for
rtw88 in the thread "rtw88: injected frames ignore radiotap rate and
retry count".

Patch 1 uses the injected legacy, HT or VHT rate, bandwidth and guard
interval, without rate fallback.

Patch 2 programs the TX descriptor retry limit for injected frames, sets
max_rate_tries so the radiotap retry count is no longer clamped to zero,
and reports NO_ACK frames as such.

Non-injected frames are not affected. Injected frames without a radiotap
rate keep the current rate selection. Keeping the sequence number of
injected management frames (IEEE80211_TX_CTL_ASSIGN_SEQ, also done in
rtw89) is not covered here.

These are compile tested only, I have no rtw88 hardware. Luka offered to
test. A way to test, with the rtw88 device in monitor mode and a second
radio sniffing the same channel:
- inject data frames with a radiotap rate, HT MCS or VHT MCS, with and
without short GI, and check they arrive at that rate
- set the monitor interface to a 40 or 80 MHz channel first (e.g.
"iw dev wlan0 set freq 5180 80 5210"; mac80211 drops frames asking for
more than the channel width), then inject frames asking for 40 or
80 MHz and check the bandwidth on the sniffer
- inject unicast frames to an absent station with a radiotap rate and
retries 0 and 6: the sniffer should see 1 and 7 copies of each frame
(mac80211 ignores the retry count without a rate, and caps it at 30);
with the NO_ACK flag it should see 1 copy
- a quick check that normal station mode still works
Please mention the chip, the bus and the band you tested.

checkpatch --strict, W=1 and sparse are clean for each patch.

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 apply the rtl8xxxu injection fixes to rtw88, using the rtw89
changes as a model, check the descriptor bits against rtl8xxxu, and
review the result. I have reviewed the changes and take responsibility
for them.

---
Ahmet Zeren (2):
wifi: rtw88: use the rate, bandwidth and GI of injected frames
wifi: rtw88: honour the retry count and NO_ACK of injected frames

drivers/net/wireless/realtek/rtw88/main.c | 1 +
drivers/net/wireless/realtek/rtw88/main.h | 2 ++
drivers/net/wireless/realtek/rtw88/tx.c | 49 ++++++++++++++++++++++++++++++-
drivers/net/wireless/realtek/rtw88/tx.h | 2 ++
4 files changed, 53 insertions(+), 1 deletion(-)
---
base-commit: 8b29fd95e2d3cb80564eb7cb34248b844422ba1e
change-id: 20261124-b4-rtw88-inject-dfb3f092da48

Best regards,
--
Ahmet Zeren <niko3x@xxxxxxxxx>