wifi: rtw89: usb: shorten the RX aggregation hold on RTL8852CU over USB 3
PATCH 1/1 wifi: rtw89: usb: shorten the RX aggregation hold on RTL8852CU over USB 3
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.
--- drivers/net/wireless/realtek/rtw89/usb.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/net/wireless/realtek/rtw89/usb.c +9 -4
@@ -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
Signature · 1 line
2.56.1
Quoted 9 lines · Lucas Zampieri
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.
Quoted 6 lines
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
So the main goal is to minimize latency, right?
Quoted 9 lines
USB interrupts, UDP 200M 2070 4880 /s irq+softirq, UDP 200M 15.0 15.9 % of one coreThe 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 <[email protected]>
Quoted 10 lines · On Tue, Dec 1, 2026, 03:06 Ping-Ke Shih <[email protected]> wrote:
Quoted 9 lines · Lucas Zampieri
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.
Quoted 8 lines
Quoted 6 lines
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 msSo the main goal is to minimize latency, right?
Partly. I'm actually chasing some packet loss on the Steam Frame dongle (this chip is what Valve ships in it), and the long RX hold was something I came across along the way. It doesn't fix the loss, but the latency drop seemed worth sending on its own.
Quoted 11 lines
Quoted 9 lines
USB interrupts, UDP 200M 2070 4880 /s irq+softirq, UDP 200M 15.0 15.9 % of one coreThe 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 <[email protected]>Acked-by Ping-Ke Shih <[email protected]>