Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH rtw-next] wifi: rtw89: usb: shorten the RX aggregation hold on RTL8852CU over USB 3
@ 2026-11-30 22:07 Lucas Zampieri
  0 siblings, 0 replies; only message in thread
From: Lucas Zampieri @ 2026-11-30 22:07 UTC (permalink / raw)
  To: Ping-Ke Shih, linux-wireless
  Cc: Lucas Zampieri, Devin Wittmayer, Nícolas F. R. A. Prado

The RTL8852CU holds received frames for up to a millisecond before
handing them to the host. On USB 3 that adds up to a millisecond to
every round trip. Commit 83de3a16c7b3 ("wifi: rtw89: usb: shorten the
RX aggregation hold on RTL8922AU over USB 3") fixed the same value for
the RTL8922AU and notes that it was carried over from the RTL8852CU.

Shorten the hold on USB 3 only, as that commit does. USB 2 keeps the
long hold.

Tested with a Valve Steam Frame. Its wireless adapter (28de:2432,
RTL8852CU) is on USB 3 as a client of the headset's access point,
6 GHz 160 MHz, power save off:

                              before   after
  round trip, median            3.65    2.60   ms
  USB interrupts, UDP 200M      2070    4880   /s
  irq+softirq, UDP 200M         15.0    15.9   % of one core

The round trip is the median of 400 pings at 10 ms intervals, repeated
with the module swapped between runs. TCP download throughput is
unchanged within run-to-run noise, 1.1 to 1.4 Gbit/s with either
value, and UDP download at 200 Mbit/s shows no added loss.

Signed-off-by: Lucas Zampieri <lcasmz54@gmail.com>
---
 drivers/net/wireless/realtek/rtw89/usb.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw89/usb.c b/drivers/net/wireless/realtek/rtw89/usb.c
index 8dc2c93e502e..17b88f02ba7f 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.c
+++ b/drivers/net/wireless/realtek/rtw89/usb.c
@@ -808,10 +808,15 @@ static void rtw89_usb_rx_agg_cfg_v1(struct rtw89_dev *rtwdev)
 
 static void rtw89_usb_rx_agg_cfg_v2(struct rtw89_dev *rtwdev)
 {
-	const u32 rxagg_0 = FIELD_PREP_CONST(B_AX_RXAGG_0_EN, 1) |
-			    FIELD_PREP_CONST(B_AX_RXAGG_0_NUM_TH, 255) |
-			    FIELD_PREP_CONST(B_AX_RXAGG_0_TIME_32US_TH, 32) |
-			    FIELD_PREP_CONST(B_AX_RXAGG_0_BUF_SZ_1K, 20);
+	struct rtw89_usb *rtwusb = rtw89_usb_priv(rtwdev);
+	u32 rxagg_0 = FIELD_PREP_CONST(B_AX_RXAGG_0_EN, 1) |
+		      FIELD_PREP_CONST(B_AX_RXAGG_0_NUM_TH, 255) |
+		      FIELD_PREP_CONST(B_AX_RXAGG_0_BUF_SZ_1K, 20);
+
+	if (rtwusb->udev->speed == USB_SPEED_SUPER)
+		rxagg_0 |= FIELD_PREP_CONST(B_AX_RXAGG_0_TIME_32US_TH, 1);
+	else
+		rxagg_0 |= FIELD_PREP_CONST(B_AX_RXAGG_0_TIME_32US_TH, 32);
 
 	rtw89_write32(rtwdev, R_AX_RXAGG_0_V1, rxagg_0);
 	rtw89_write32(rtwdev, R_AX_RXAGG_1_V1, 0x1F);

base-commit: ae6b9e98b9045e47f609ec2a8197a3f3109627cb
-- 
2.56.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-30 22:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 22:07 [PATCH rtw-next] wifi: rtw89: usb: shorten the RX aggregation hold on RTL8852CU over USB 3 Lucas Zampieri

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