mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RFT rtw-next v3 0/2] wifi: rtw88: honour rate, retries and bandwidth of injected frames
@ 2026-11-30 20:35 Ahmet Zeren via B4 Relay
  2026-11-30 20:35 ` [PATCH RFT rtw-next v3 1/2] wifi: rtw88: use the rate, bandwidth and GI " Ahmet Zeren via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ahmet Zeren via B4 Relay @ 2026-11-30 20:35 UTC (permalink / raw)
  To: Ping-Ke Shih
  Cc: linux-wireless, Luka Gejak, Bitterblue Smith, Martin,
	linux-kernel, Ahmet Zeren

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, and a VHT rate ID for VHT rates.

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.

Apart from the TX status of NO_ACK frames, which also covers
non-injected group addressed frames, 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.

I have no rtw88 hardware. Luka tested v1, and Martin tested v2 on an
RTL8812AU (rtw88_8812au, USB, 5 GHz) against an unpatched build: the
rate, bandwidth and GI up to VHT MCS7 (1 and 2 streams), the retry
count and NO_ACK were honoured. Injected VHT MCS8 and MCS9 at 80 MHz
didn't go out. In station mode with fix_rate, MCS8 did go out with the
station's VHT rate ID, so v3 sets a VHT rate ID for injected VHT
frames; this is not tested yet. MCS9 with fix_rate didn't go out, and
once dropped the adapter off USB, so take care when testing it.

Testing the v3 changes on any rtw88 chip is welcome: injected VHT MCS8
and MCS9 frames, and the TX status of injected NO_ACK frames to an
absent station, which should now be reported as sent.

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, review
the result, and make the changes asked for in the review of v1 and v2.
I have reviewed the changes and take responsibility for them.

---
Changes in v3:
- Patch 1: give injected VHT frames the VHT rate ID a station would
  get; with the legacy rate ID, VHT MCS8 did not go out on the
  RTL8812AU (Martin, Ping-Ke). get_rate_id() is made non-static and
  renamed to rtw_get_rate_id() for this.
- Patch 2: also report a NO_ACK frame as
  IEEE80211_TX_STAT_NOACK_TRANSMITTED when it hit the retry limit, in
  both TX report versions, but not when it was dropped for its life
  time or by the MAC. Martin found that unacked NO_ACK frames end with
  "retry over", and Ping-Ke explained the report status values.
- Martin's Tested-by for v2 is not carried over, as both patches
  changed.
- Rebased on rtw-next.
- Link to v2: https://patch.msgid.link/20261127-b4-rtw88-inject-v2-0-f9701b9243a3@proton.me

Changes in v2:
- Patch 2: program the radiotap retry count only when the frame has a
  usable radiotap rate (Luka).
- Patch 2: in the TX report, set IEEE80211_TX_STAT_NOACK_TRANSMITTED
  instead of IEEE80211_TX_STAT_ACK for NO_ACK frames that were sent,
  including group addressed frames (Luka).
- Patch 2: limit max_rate_tries by both the descriptor retry limit and
  IEEE80211_MAX_TX_RETRY.
- Patch 1: no change; DATA_SC stays zero, Luka's hardware test supports
  that REG_DATA_SC is used for frames narrower than the channel.
- Link to v1: https://patch.msgid.link/20261124-b4-rtw88-inject-v1-0-f7457e496924@proton.me

---
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/fw.h   |  2 +
 drivers/net/wireless/realtek/rtw88/main.c |  5 ++-
 drivers/net/wireless/realtek/rtw88/main.h |  4 ++
 drivers/net/wireless/realtek/rtw88/tx.c   | 62 +++++++++++++++++++++++++++++--
 drivers/net/wireless/realtek/rtw88/tx.h   |  2 +
 5 files changed, 69 insertions(+), 6 deletions(-)
---
base-commit: ae6b9e98b9045e47f609ec2a8197a3f3109627cb
change-id: 20261124-b4-rtw88-inject-dfb3f092da48

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



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

end of thread, other threads:[~2026-12-01  2:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 20:35 [PATCH RFT rtw-next v3 0/2] wifi: rtw88: honour rate, retries and bandwidth of injected frames Ahmet Zeren via B4 Relay
2026-11-30 20:35 ` [PATCH RFT rtw-next v3 1/2] wifi: rtw88: use the rate, bandwidth and GI " Ahmet Zeren via B4 Relay
2026-11-30 20:35 ` [PATCH RFT rtw-next v3 2/2] wifi: rtw88: honour the retry count and NO_ACK " Ahmet Zeren via B4 Relay
2026-11-30 21:16 ` [PATCH RFT rtw-next v3 0/2] wifi: rtw88: honour rate, retries and bandwidth " martin
2026-11-30 22:05   ` Ahmet Zeren
2026-12-01  2:56     ` 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

all inboxes | Powered by JetHome®