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

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.

One open question: Enver found that on rtw89 AX chips an unacked
unicast NO_ACK frame completes with "retry limit" rather than "done".
If rtw88 reports it the same way, such frames end up reported as failed
instead of IEEE80211_TX_STAT_NOACK_TRANSMITTED. Luka, could you check
the TX status of injected NO_ACK frames to an absent station? If they
come back as failed, I'll also treat that report 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, and
review the result. I have reviewed the changes and take responsibility
for them.

---
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

To: Ping-Ke Shih <pkshih@realtek.com>
Cc: linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
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 |  3 ++
 drivers/net/wireless/realtek/rtw88/tx.c   | 51 +++++++++++++++++++++++++++++--
 drivers/net/wireless/realtek/rtw88/tx.h   |  2 ++
 4 files changed, 55 insertions(+), 2 deletions(-)
---
base-commit: 8b29fd95e2d3cb80564eb7cb34248b844422ba1e
change-id: 20261124-b4-rtw88-inject-dfb3f092da48

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



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

end of thread, other threads:[~2026-11-27 19:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-27  8:59 [PATCH RFT rtw-next v2 0/2] wifi: rtw88: honour rate, retries and bandwidth of injected frames Ahmet Zeren via B4 Relay
2026-11-27  8:59 ` [PATCH RFT rtw-next v2 1/2] wifi: rtw88: use the rate, bandwidth and GI " Ahmet Zeren via B4 Relay
2026-11-27  9:00 ` [PATCH RFT rtw-next v2 2/2] wifi: rtw88: honour the retry count and NO_ACK " Ahmet Zeren via B4 Relay
2026-11-27 11:59   ` Luka Gejak
2026-11-27 12:24     ` Ahmet Zeren
2026-11-27 15:19 ` [PATCH RFT rtw-next v2 0/2] wifi: rtw88: honour rate, retries and bandwidth " martin
2026-11-27 18:56   ` Ahmet Zeren
2026-11-27 19:18     ` martin

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®