Linux wireless drivers development
 help / color / mirror / Atom feed
From: Lucas Zampieri <lcasmz54@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>, linux-wireless@vger.kernel.org
Cc: "Lucas Zampieri" <lcasmz54@gmail.com>,
	"Devin Wittmayer" <lucid_duck@justthetip.ca>,
	"Nícolas F. R. A. Prado" <nfraprado@collabora.com>
Subject: [PATCH rtw-next] wifi: rtw89: usb: shorten the RX aggregation hold on RTL8852CU over USB 3
Date: Mon, 30 Nov 2026 22:07:52 +0000	[thread overview]
Message-ID: <20261130220752.596129-1-lcasmz54@gmail.com> (raw)

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

                 reply	other threads:[~2026-11-30 22:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130220752.596129-1-lcasmz54@gmail.com \
    --to=lcasmz54@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lucid_duck@justthetip.ca \
    --cc=nfraprado@collabora.com \
    --cc=pkshih@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox