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; 8+ 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] 8+ messages in thread

* [PATCH RFT rtw-next v3 1/2] wifi: rtw88: use the rate, bandwidth and GI of injected frames
  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 ` Ahmet Zeren via B4 Relay
  2026-12-01  6:02   ` Luka Gejak
  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
  2 siblings, 1 reply; 8+ 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

From: Ahmet Zeren <niko3x@proton.me>

Injected frames ignore the rate, bandwidth and guard interval requested
in their radiotap header. Data frames have no station, so USE_RATE is not
set and the firmware rate adaptation picks the rate. Management frames
are sent at the lowest basic rate.

Use the injected rate, bandwidth and guard interval and disable rate
fallback, like rtw89 does since commit e96abe4fd7cd ("wifi: rtw89:
consider data rate/bandwidth/GI for injected packets"). Injected frames
without a radiotap rate are unchanged.

Injected VHT frames also get the VHT rate ID that a station would get.
With the default legacy rate ID, injected VHT MCS8 frames never went
out on an RTL8812AU, while station frames fixed to VHT MCS8 did. Make
get_rate_id() non-static and rename it to rtw_get_rate_id() for this.

Signed-off-by: Ahmet Zeren <niko3x@proton.me>
---
 drivers/net/wireless/realtek/rtw88/main.c |  4 ++--
 drivers/net/wireless/realtek/rtw88/main.h |  1 +
 drivers/net/wireless/realtek/rtw88/tx.c   | 38 +++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index e2d37c300f7..6eeb139b716 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -1037,7 +1037,7 @@ static u64 get_vht_ra_mask(struct ieee80211_sta *sta)
 	return ra_mask;
 }
 
-static u8 get_rate_id(u8 wireless_set, enum rtw_bandwidth bw_mode, u8 tx_num)
+u8 rtw_get_rate_id(u8 wireless_set, enum rtw_bandwidth bw_mode, u8 tx_num)
 {
 	u8 rate_id = 0;
 
@@ -1316,7 +1316,7 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
 	    sta->deflink.ht_cap.ht_supported)
 		tx_num = efuse->hw_cap.nss;
 
-	rate_id = get_rate_id(wireless_set, bw_mode, tx_num);
+	rate_id = rtw_get_rate_id(wireless_set, bw_mode, tx_num);
 
 	ra_mask &= rtw_rate_mask_rssi(si, wireless_set);
 	ra_mask = rtw_rate_mask_recover(ra_mask, ra_mask_bak);
diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h
index 44a1cd6bf74..c7402189294 100644
--- a/drivers/net/wireless/realtek/rtw88/main.h
+++ b/drivers/net/wireless/realtek/rtw88/main.h
@@ -2261,6 +2261,7 @@ void rtw_chip_prepare_tx(struct rtw_dev *rtwdev);
 void rtw_vif_port_config(struct rtw_dev *rtwdev, struct rtw_vif *rtwvif,
 			 u32 config);
 void rtw_tx_report_purge_timer(struct timer_list *t);
+u8 rtw_get_rate_id(u8 wireless_set, enum rtw_bandwidth bw_mode, u8 tx_num);
 void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
 			 bool reset_ra_mask);
 void rtw_core_scan_start(struct rtw_dev *rtwdev, struct rtw_vif *rtwvif,
diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
index 82c1af94f1c..e41c2724a16 100644
--- a/drivers/net/wireless/realtek/rtw88/tx.c
+++ b/drivers/net/wireless/realtek/rtw88/tx.c
@@ -407,6 +407,41 @@ out:
 	}
 }
 
+static void rtw_tx_injected_pkt_info_update(struct rtw_dev *rtwdev,
+					    struct rtw_tx_pkt_info *pkt_info,
+					    struct ieee80211_tx_info *info)
+{
+	struct ieee80211_tx_rate *rate = &info->control.rates[0];
+	u8 nss, mcs;
+
+	if (!(info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT))
+		return;
+
+	if (rate->flags & IEEE80211_TX_RC_80_MHZ_WIDTH)
+		pkt_info->bw = RTW_CHANNEL_WIDTH_80;
+	else if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
+		pkt_info->bw = RTW_CHANNEL_WIDTH_40;
+	else
+		pkt_info->bw = RTW_CHANNEL_WIDTH_20;
+
+	if (rate->flags & IEEE80211_TX_RC_VHT_MCS) {
+		nss = ieee80211_rate_get_vht_nss(rate);
+		mcs = ieee80211_rate_get_vht_mcs(rate);
+		pkt_info->rate = DESC_RATEVHT1SS_MCS0 + (nss - 1) * 10 + mcs;
+		pkt_info->rate_id = rtw_get_rate_id(WIRELESS_OFDM | WIRELESS_VHT,
+						    pkt_info->bw,
+						    rtwdev->efuse.hw_cap.nss);
+	} else if (rate->flags & IEEE80211_TX_RC_MCS) {
+		pkt_info->rate = DESC_RATEMCS0 + rate->idx;
+	} else {
+		pkt_info->rate = ieee80211_get_tx_rate(rtwdev->hw, info)->hw_value;
+	}
+
+	pkt_info->short_gi = rate->flags & IEEE80211_TX_RC_SHORT_GI;
+	pkt_info->use_rate = true;
+	pkt_info->dis_rate_fallback = true;
+}
+
 void rtw_tx_pkt_info_update(struct rtw_dev *rtwdev,
 			    struct rtw_tx_pkt_info *pkt_info,
 			    struct ieee80211_sta *sta,
@@ -434,6 +469,9 @@ void rtw_tx_pkt_info_update(struct rtw_dev *rtwdev,
 	else if (ieee80211_is_data(fc))
 		rtw_tx_data_pkt_info_update(rtwdev, pkt_info, sta, skb);
 
+	if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED))
+		rtw_tx_injected_pkt_info_update(rtwdev, pkt_info, info);
+
 	bmc = is_broadcast_ether_addr(hdr->addr1) ||
 	      is_multicast_ether_addr(hdr->addr1);
 

-- 
2.56.1



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

* [PATCH RFT rtw-next v3 2/2] wifi: rtw88: honour the retry count and NO_ACK of injected frames
  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 ` Ahmet Zeren via B4 Relay
  2026-12-01  6:02   ` Luka Gejak
  2026-11-30 21:16 ` [PATCH RFT rtw-next v3 0/2] wifi: rtw88: honour rate, retries and bandwidth " martin
  2 siblings, 1 reply; 8+ 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

From: Ahmet Zeren <niko3x@proton.me>

max_rate_tries is not set, so mac80211 clamps the radiotap retry count
of injected frames to zero, and the TX descriptor retry limit is never
programmed. Injected unicast frames, even NO_ACK ones, are retried up to
the default limit, so frames to an absent station stall injection. The
TX report path reports NO_ACK frames as acked or failed rather than
IEEE80211_TX_STAT_NOACK_TRANSMITTED.

Limit max_rate_tries by both the TX descriptor retry limit and
IEEE80211_MAX_TX_RETRY, and program the descriptor retry limit for
injected frames: no retries for NO_ACK frames, otherwise the radiotap
retry count if the frame has a usable radiotap rate. In the TX report,
report NO_ACK frames that were sent as IEEE80211_TX_STAT_NOACK_TRANSMITTED,
including non-injected group addressed frames. An unacked unicast NO_ACK
frame is reported as "retry over" in the V0 report, and going by the
report format as "retry drop" in V1, so count those as sent too, but
not frames dropped for their life time or by the MAC.

rtw89 got similar changes in commit 92608bb5f14f ("wifi: rtw89: honor
ASSIGN_SEQ, retries, and NO_ACK for injected frames"). The retry limit
fields are at the same place as TXDESC40_RETRY_LIMIT_* in the
RTL8192EU/RTL8723BU TX descriptor of rtl8xxxu.

Signed-off-by: Ahmet Zeren <niko3x@proton.me>
---
 drivers/net/wireless/realtek/rtw88/fw.h   |  2 ++
 drivers/net/wireless/realtek/rtw88/main.c |  1 +
 drivers/net/wireless/realtek/rtw88/main.h |  3 +++
 drivers/net/wireless/realtek/rtw88/tx.c   | 24 ++++++++++++++++++++----
 drivers/net/wireless/realtek/rtw88/tx.h   |  2 ++
 5 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/fw.h b/drivers/net/wireless/realtek/rtw88/fw.h
index 48ad9ceab6e..acbc332260a 100644
--- a/drivers/net/wireless/realtek/rtw88/fw.h
+++ b/drivers/net/wireless/realtek/rtw88/fw.h
@@ -369,8 +369,10 @@ struct rtw_fw_hdr_legacy {
 /* C2H */
 #define GET_CCX_REPORT_SEQNUM_V0(c2h_payload)	(c2h_payload[6] & 0xfc)
 #define GET_CCX_REPORT_STATUS_V0(c2h_payload)	(c2h_payload[0] & 0xc0)
+#define CCX_REPORT_STATUS_V0_RETRY_OVER		BIT(7)
 #define GET_CCX_REPORT_SEQNUM_V1(c2h_payload)	(c2h_payload[8] & 0xfc)
 #define GET_CCX_REPORT_STATUS_V1(c2h_payload)	(c2h_payload[9] & 0xc0)
+#define CCX_REPORT_STATUS_V1_RETRY_DROP		0x40
 
 #define GET_SCAN_REPORT_RETURN_CODE(c2h_payload)	(c2h_payload[2] & 0xff)
 
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 6eeb139b716..34d65f73de2 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -2276,6 +2276,7 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw)
 		max_tx_headroom += RTW_SDIO_DATA_PTR_ALIGN;
 
 	hw->extra_tx_headroom = max_tx_headroom;
+	hw->max_rate_tries = min(RTW_TX_DATA_RTY_LMT_MAX + 1, IEEE80211_MAX_TX_RETRY);
 	hw->queues = IEEE80211_NUM_ACS;
 	hw->txq_data_size = sizeof(struct rtw_txq);
 	hw->sta_data_size = sizeof(struct rtw_sta_info);
diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h
index c7402189294..0acc6b4d4f2 100644
--- a/drivers/net/wireless/realtek/rtw88/main.h
+++ b/drivers/net/wireless/realtek/rtw88/main.h
@@ -625,6 +625,9 @@ struct rtw_tx_pkt_info {
 	bool stbc;
 	bool ldpc;
 	bool dis_rate_fallback;
+	bool rty_lmt_en;
+	u8 data_rty_lmt;
+#define RTW_TX_DATA_RTY_LMT_MAX	0x3f
 	bool bmc;
 	bool use_rate;
 	bool ls;
diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
index e41c2724a16..d7760732ba1 100644
--- a/drivers/net/wireless/realtek/rtw88/tx.c
+++ b/drivers/net/wireless/realtek/rtw88/tx.c
@@ -68,7 +68,9 @@ void rtw_tx_fill_tx_desc(struct rtw_dev *rtwdev,
 		      le32_encode_bits(pkt_info->nav_use_hdr, RTW_TX_DESC_W3_NAVUSEHDR) |
 		      le32_encode_bits(pkt_info->ampdu_factor, RTW_TX_DESC_W3_MAX_AGG_NUM);
 
-	tx_desc->w4 = le32_encode_bits(pkt_info->rate, RTW_TX_DESC_W4_DATARATE);
+	tx_desc->w4 = le32_encode_bits(pkt_info->rate, RTW_TX_DESC_W4_DATARATE) |
+		      le32_encode_bits(pkt_info->rty_lmt_en, RTW_TX_DESC_W4_RTY_LMT_EN) |
+		      le32_encode_bits(pkt_info->data_rty_lmt, RTW_TX_DESC_W4_DATA_RTY_LMT);
 
 	if (rtwdev->chip->old_datarate_fb_limit)
 		tx_desc->w4 |= le32_encode_bits(0x1f, RTW_TX_DESC_W4_DATARATE_FB_LIMIT);
@@ -220,13 +222,15 @@ void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn)
 EXPORT_SYMBOL(rtw_tx_report_enqueue);
 
 static void rtw_tx_report_tx_status(struct rtw_dev *rtwdev,
-				    struct sk_buff *skb, bool acked)
+				    struct sk_buff *skb, bool acked, bool sent)
 {
 	struct ieee80211_tx_info *info;
 
 	info = IEEE80211_SKB_CB(skb);
 	ieee80211_tx_info_clear_status(info);
-	if (acked)
+	if (sent && info->flags & IEEE80211_TX_CTL_NO_ACK)
+		info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
+	else if (acked)
 		info->flags |= IEEE80211_TX_STAT_ACK;
 	else
 		info->flags &= ~IEEE80211_TX_STAT_ACK;
@@ -240,6 +244,7 @@ void rtw_tx_report_handle(struct rtw_dev *rtwdev, struct sk_buff *skb, int src)
 	struct rtw_c2h_cmd *c2h;
 	struct sk_buff *cur, *tmp;
 	unsigned long flags;
+	bool retry_over;
 	u8 sn, st;
 	u8 *n;
 
@@ -248,9 +253,11 @@ void rtw_tx_report_handle(struct rtw_dev *rtwdev, struct sk_buff *skb, int src)
 	if (src == C2H_CCX_TX_RPT) {
 		sn = GET_CCX_REPORT_SEQNUM_V0(c2h->payload);
 		st = GET_CCX_REPORT_STATUS_V0(c2h->payload);
+		retry_over = st == CCX_REPORT_STATUS_V0_RETRY_OVER;
 	} else {
 		sn = GET_CCX_REPORT_SEQNUM_V1(c2h->payload);
 		st = GET_CCX_REPORT_STATUS_V1(c2h->payload);
+		retry_over = st == CCX_REPORT_STATUS_V1_RETRY_DROP;
 	}
 
 	spin_lock_irqsave(&tx_report->q_lock, flags);
@@ -258,7 +265,8 @@ void rtw_tx_report_handle(struct rtw_dev *rtwdev, struct sk_buff *skb, int src)
 		n = (u8 *)IEEE80211_SKB_CB(cur)->status.status_driver_data;
 		if (*n == sn) {
 			__skb_unlink(cur, &tx_report->queue);
-			rtw_tx_report_tx_status(rtwdev, cur, st == 0);
+			rtw_tx_report_tx_status(rtwdev, cur, st == 0,
+						st == 0 || retry_over);
 			break;
 		}
 	}
@@ -414,6 +422,14 @@ static void rtw_tx_injected_pkt_info_update(struct rtw_dev *rtwdev,
 	struct ieee80211_tx_rate *rate = &info->control.rates[0];
 	u8 nss, mcs;
 
+	if (info->flags & IEEE80211_TX_CTL_NO_ACK) {
+		pkt_info->rty_lmt_en = true;
+		pkt_info->data_rty_lmt = 0;
+	} else if (info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT) {
+		pkt_info->rty_lmt_en = true;
+		pkt_info->data_rty_lmt = rate->count - 1;
+	}
+
 	if (!(info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT))
 		return;
 
diff --git a/drivers/net/wireless/realtek/rtw88/tx.h b/drivers/net/wireless/realtek/rtw88/tx.h
index a68ba3b1215..d2489a5bbb4 100644
--- a/drivers/net/wireless/realtek/rtw88/tx.h
+++ b/drivers/net/wireless/realtek/rtw88/tx.h
@@ -49,6 +49,8 @@ struct rtw_tx_desc {
 #define RTW_TX_DESC_W3_MAX_AGG_NUM GENMASK(21, 17)
 #define RTW_TX_DESC_W4_DATARATE GENMASK(6, 0)
 #define RTW_TX_DESC_W4_DATARATE_FB_LIMIT GENMASK(12, 8)
+#define RTW_TX_DESC_W4_RTY_LMT_EN BIT(17)
+#define RTW_TX_DESC_W4_DATA_RTY_LMT GENMASK(23, 18)
 #define RTW_TX_DESC_W4_RTSRATE GENMASK(28, 24)
 #define RTW_TX_DESC_W5_DATA_SHORT BIT(4)
 #define RTW_TX_DESC_W5_DATA_BW GENMASK(6, 5)

-- 
2.56.1



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

* Re: [PATCH RFT rtw-next v3 0/2] wifi: rtw88: honour rate, retries and bandwidth of injected frames
  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 ` martin
  2026-11-30 22:05   ` Ahmet Zeren
  2 siblings, 1 reply; 8+ messages in thread
From: martin @ 2026-11-30 21:16 UTC (permalink / raw)
  To: niko3x
  Cc: Ping-Ke Shih, linux-wireless, Luka Gejak, Bitterblue Smith, linux-kernel

Ahmet Zeren <niko3x@proton.me> wrote:
> 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.

Tested v3 on the RTL8812AU (rtw88_8812au, USB, firmware 52.14.0,
Ubuntu 7.0.0-43), injecting unicast to an absent address on channel 36
at 80 MHz, 50 frames per run, with an MT7921AU receiver. I did not try
MCS9.

Patch 1:
- VHT MCS8 NSS1 now goes out. At 40 MHz every run, with or without a
   radiotap retry count.
- At 80 MHz only with a retry count: with --retries 3 the frames arrive
   as VHT MCS8 NSS1 80 MHz, also with short GI, and most first attempts
   are among them. Without a retry count, i.e. a retry limit of 0, no
   frame reached the receiver, although the TX report says retry over
   for each one.
- VHT MCS7 NSS2 and MCS8 NSS2 were not seen by this receiver. With v2
   only the RTL8814AU saw NSS2 frames, and I did not use it this time.
- Legacy, HT MCS7, VHT MCS7 with short GI, --retries 3 and NO_ACK
   behave as with v2.

Patch 2 (with a debug print of the CCX status in
rtw_tx_report_handle()):
- with NO_ACK: 50 of 50 reports "status 0x80", reported as
   IEEE80211_TX_STAT_NOACK_TRANSMITTED
- without NO_ACK: 50 of 50 "status 0x80", reported as failed
- The TX status frames on the monitor interface still carry TX_FAIL
   for NO_ACK frames; that is mac80211 without your patch.

Tested-by: Martin <martin@rfdeck.de>

Martin


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

* Re: [PATCH RFT rtw-next v3 0/2] wifi: rtw88: honour rate, retries and bandwidth of injected frames
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Ahmet Zeren @ 2026-11-30 22:05 UTC (permalink / raw)
  To: martin
  Cc: Ping-Ke Shih, linux-wireless, Luka Gejak, Bitterblue Smith, linux-kernel

Hi Martin,

Thanks for testing v3 so quickly, and for the Tested-by.

> - At 80 MHz only with a retry count: with --retries 3 the frames arrive
>    as VHT MCS8 NSS1 80 MHz, also with short GI, and most first attempts
>    are among them. Without a retry count, i.e. a retry limit of 0, no
>    frame reached the receiver, although the TX report says retry over
>    for each one.

That's odd, since with retries the first attempts do arrive. Ping-Ke,
do you know of anything on the 8812A that behaves differently with a
retry limit of 0 at 80 MHz? Before this series VHT MCS8 didn't go out
at all, so I'd leave it as it is unless there's a known cause.

Ahmet



Sent with Proton Mail secure email.

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

* RE: [PATCH RFT rtw-next v3 0/2] wifi: rtw88: honour rate, retries and bandwidth of injected frames
  2026-11-30 22:05   ` Ahmet Zeren
@ 2026-12-01  2:56     ` Ping-Ke Shih
  0 siblings, 0 replies; 8+ messages in thread
From: Ping-Ke Shih @ 2026-12-01  2:56 UTC (permalink / raw)
  To: Ahmet Zeren, martin
  Cc: linux-wireless, Luka Gejak, Bitterblue Smith, linux-kernel

Ahmet Zeren <niko3x@proton.me> wrote:
> Hi Martin,
> 
> Thanks for testing v3 so quickly, and for the Tested-by.
> 
> > - At 80 MHz only with a retry count: with --retries 3 the frames arrive
> >    as VHT MCS8 NSS1 80 MHz, also with short GI, and most first attempts
> >    are among them. Without a retry count, i.e. a retry limit of 0, no
> >    frame reached the receiver, although the TX report says retry over
> >    for each one.
> 
> That's odd, since with retries the first attempts do arrive. Ping-Ke,
> do you know of anything on the 8812A that behaves differently with a
> retry limit of 0 at 80 MHz? Before this series VHT MCS8 didn't go out
> at all, so I'd leave it as it is unless there's a known cause.

I have not heard about that. How about setting retry limit to 1, not 0?

Have you seen VHT MCS8 in station mode with RA?

Ping-Ke


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

* Re: [PATCH RFT rtw-next v3 1/2] wifi: rtw88: use the rate, bandwidth and GI of injected frames
  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-12-01  6:02   ` Luka Gejak
  0 siblings, 0 replies; 8+ messages in thread
From: Luka Gejak @ 2026-12-01  6:02 UTC (permalink / raw)
  To: Ahmet Zeren
  Cc: Ping-Ke Shih, linux-wireless, Bitterblue Smith, Martin, linux-kernel

Hi Ahmet,

Thanks for the update. One comment below.

On November 30, 2026 11:35:57 PM GMT+03:00, Ahmet Zeren
<niko3x@proton.me> wrote:

[ ... ]
> +	if (rate->flags & IEEE80211_TX_RC_80_MHZ_WIDTH)
> +		pkt_info->bw = RTW_CHANNEL_WIDTH_80;
> +	else if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
> +		pkt_info->bw = RTW_CHANNEL_WIDTH_40;
> +	else
> +		pkt_info->bw = RTW_CHANNEL_WIDTH_20;

As far as I can see, the mac80211 parser already accepts VHT MCS9 at
20 MHz with one stream. It checks the VHT map, which advertises MCS9
without specifying widths. That combination is invalid in 802.11ac.

Before this patch rtw88 ignored the requested rate. It would now
program that combination as a fixed rate. This seems to be a
preexisting issue that is only now made reachable in rtw88, so I think
the parser check belongs in a separate mac80211 patch. I am fine with
whoever sends it.

Best regards,
Luka Gejak

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

* Re: [PATCH RFT rtw-next v3 2/2] wifi: rtw88: honour the retry count and NO_ACK of injected frames
  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-12-01  6:02   ` Luka Gejak
  0 siblings, 0 replies; 8+ messages in thread
From: Luka Gejak @ 2026-12-01  6:02 UTC (permalink / raw)
  To: Ahmet Zeren
  Cc: Ping-Ke Shih, linux-wireless, Bitterblue Smith, Martin, linux-kernel

Hi Ahmet,

Thanks for the update. One comment below.

On November 30, 2026 11:35:58 PM GMT+03:00, Ahmet Zeren
<niko3x@proton.me> wrote:

[ ... ]
> -			rtw_tx_report_tx_status(rtwdev, cur, st == 0);
> +			rtw_tx_report_tx_status(rtwdev, cur, st == 0,
> +						st == 0 || retry_over);

Martin's receiver saw no one stream MCS8 frames at 80 MHz with the
retry limit set to zero, even though CCX reported retry over each
time. With retries enabled the receiver saw most first attempts.
https://lore.kernel.org/r/524b527f0ee4499a8819e0f63849eebe@realtek.com/

As far as I can see, this reports a NO_ACK frame as sent on retry over,
and NO_ACK also sets the retry limit to zero. Do we know whether that
status guarantees that the data frame went out? The receiver result
could also mean the frames went out and it couldn't decode them.

Best regards,
Luka Gejak

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

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

Thread overview: 8+ 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-12-01  6:02   ` Luka Gejak
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-12-01  6:02   ` Luka Gejak
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®