From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Lucid Duck <lucid_duck@justthetip.ca>, linux-wireless@vger.kernel.org
Cc: Ping-Ke Shih <pkshih@realtek.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/1] wifi: rtw89: usb: Support switching to USB 3 mode
Date: Mon, 11 May 2026 13:55:19 +0300 [thread overview]
Message-ID: <fe81de61-f22b-4331-9ef2-fe602f9880ea@gmail.com> (raw)
In-Reply-To: <20260508054421.128938-1-lucid_duck@justthetip.ca>
On 08/05/2026 08:44, Lucid Duck wrote:
> From: Devin Wittmayer <lucid_duck@justthetip.ca>
>
> This patch adds USB 2 to USB 3 mode switching for the AX-generation
> chips in the rtw89 USB driver (8852AU, 8852BU, 8852CU and helper
> variants). Without it, those adapters enumerate at USB 2.0
> high-speed on first plug and stay there, capping real-world
> throughput around 260 Mbps TCP regardless of radio capability.
>
> It is Bitterblue Smith's morrownr/rtw89 commit cd287ccf544b
> (2025-07-16) rebased onto wireless-next without code changes:
> author's Signed-off-by preserved, my Signed-off-by added as
> relayer, Tested-by per chip based on the matrix below.
>
> The bug
> =======
>
> These chips present as USB 2 devices on first plug. The driver is
> expected to send a switch-mode register write to make them disappear
> and re-enumerate as USB 3 SuperSpeed. Mainline rtw89 does not issue
> these commands anywhere. Every user with one of these adapters on
> a mainline-derived distribution sits at the USB 2.0 ceiling for
> the life of the plug, regardless of negotiated radio rate.
>
> The fix
> =======
>
> The patch covers AX-generation chips (8852AU, 8852BU, 8852CU and
> helper variants) via R_AX_PAD_CTRL2. It also adds the
> switch_usb_mode module parameter (default on) for users who
> experience 2.4 GHz interference under USB 3.
>
> Mainline precedent
> ==================
>
> The same mechanism is in mainline rtw88 across three commits
> between July 2024 and April 2025, all authored by Bitterblue Smith:
>
> commit 315c23a64e99 ("wifi: rtw88: usb: Support USB 3 with RTL8822CU/RTL8822BU")
> commit 82a35723a67c ("wifi: rtw88: usb: Support USB 3 with RTL8812AU")
> commit bf1103654df9 ("wifi: rtw88: usb: Enable switching the RTL8814AU to USB 3")
>
> Reviewer of record: Ping-Ke Shih, current rtw89 maintainer.
>
> Test results
> ============
>
> 60 plug-cycles + 30+ gated throughput cells captured 2026-04-11
> to 2026-05-07. Both x86_64 (Tiger Lake xHCI) and aarch64
> (Broadcom RP1 xHCI) reproductions confirm the bug and the fix.
>
> Hosts: Framework 13 (x86_64, Fedora 43 / 6.19.13, Tiger Lake xHCI)
> NucBox K8 Plus (x86_64, Arch Linux / 6.17.9, AMD F19h USB)
> Raspberry Pi 5 (aarch64, Pi OS / 6.12.47, BCM2712 + RP1)
> Banana Pi BPi-R4 Pro (aarch64, OpenWrt / 6.6.93, MT7988A;
> also used as a controlled lab AP)
> Adapters: D-Link DWA-X1850 A1 / B1 (RTL8852AU)
> BrosTrend AX1L compact / AX4L high-gain (RTL8852BU)
> BrosTrend AX8L AXE5400 / EDUP AXE5400 (RTL8852CU)
> APs: consumer multi-band router (WPA3-SAE / WPA2-PSK)
> BPi-R4 Pro single-band lab AP (WPA3-SAE)
> Server: Linux iperf3 host on 2.5 GbE wired Ethernet
>
> Full per-cell evidence (raw iperf3 stdout, dmesg captures, sysfs
> snapshots, iw link snapshots, byte-counter deltas, per-host detail)
> at https://github.com/Lucid-Duck/rtw89-usb3-gap.
>
> Plug-cycle. N=10 cycles per (chip, host) cell. Pass = post-plug
> /sys/bus/usb/devices/<id>/speed reads 5000 (USB 3 SuperSpeed),
> zero WARN/BUG/Oops in cycle-bracketed dmesg, non-empty association
> BSSID after settle.
>
> Adapter (chip) FW13 6.19 K8 Plus 6.17
> --------------------------- ------------- --------------
> DWA-X1850 A1 (RTL8852AU) 10/10 PASS 10/10 PASS
> BrosTrend AX1L (RTL8852BU) 10/10 PASS 10/10 PASS
>
> FW13: Fedora 43, 6.19.13, wireless-next + this patch
> K8 Plus: Arch Linux, 6.17.9-arch1-1, morrownr/rtw89 (upstream
> fork; identical AX-gen behavior to this patch)
>
> Throughput. TCP iperf3, N=10 30-second iterations per sub-cell,
> four sub-cells per cell (P=8 and P=1, each direction), to a Linux
> 2.5 GbE host. Per-cell /32 host route forces traffic onto the WiFi
> adapter; per-iteration byte-counter cross-check on every cited cell
> shows wireless tx/rx delta at 103-108% of iperf3 reported bytes
> (excess is normal TCP/IP framing), so wired-NIC bleed is ruled out.
> Linux tuning applied (rmem 32 MB, RPS=ff on the WiFi RX queue).
>
> FW13 stock (in-kernel rtw89, USB 2 stuck) vs patched (USB 3
> SuperSpeed), same adapter / AP / kernel / capture script, P=8 mean
> Mbps, AP is the consumer multi-band router:
>
> Adapter (chip) Band, width UL stock UL patched DL stock DL patched
> -------------------------- --------------- -------- ---------- -------- ----------
> EDUP AXE5400 (RTL8852CU) 6 GHz, 160 MHz 269 1364 327 579
> AX8L AXE5400 (RTL8852CU) 6 GHz, 160 MHz 269 1440 324 510
> AX4L AX1800 (RTL8852BU) 5 GHz, 80 MHz 208 597 293 695
> AX1L AX1800 (RTL8852BU) 5 GHz, 80 MHz 235 608 273 843
> DWA-X1850 A1 (RTL8852AU) 5 GHz, 80 MHz 254 748 264 707
> DWA-X1850 B1 (RTL8852AU) 5 GHz, 80 MHz 248 706 265 679
>
> USB enumeration verified at SuperSpeed (5000 Mbps) on every
> patched cell, both pre and post.
>
> K8 Plus second-rig spot check, kernel 6.17.9-arch1-1, consumer
> multi-band router, single-link 5 GHz 80 MHz, TCP P=1, N=10:
>
> DWA-X1850 A1 (RTL8852AU) 788 UL / 693 DL Mbps (sigma 16 / 54)
>
> For comparison, every stock cell above caps at 208-327 Mbps, the
> USB 2.0 ceiling.
>
> Future work: BE-generation (RTL8922AU) USB switch-mode
> ======================================================
>
> The same mechanism applies to BE-generation chips (RTL8922AU) via
> R_BE_PAD_CTRL2.
> The implementation is in morrownr/rtw89 commit c8a8ac49996b
> ("wifi: rtw89: usb: USB 3 switching for RTL8922AU", 2025-08-07)
> by Bitterblue Smith, but that commit has no Signed-off-by; the
> public two-week notice in
> https://github.com/morrownr/rtw89/issues/82 (2026-04-21,
> deadline 2026-05-05) did not produce one. checkpatch --strict
> rejects third-party submission on the missing trailer.
>
This is what's stopping you? Haha.
> I tested c8a8ac49996b on a BrosTrend BE6500 (RTL8922AU): plug-
> cycle 10/10 PASS on both FW13 and K8 Plus; consumer-router MLO
> 3-link 1430 UL / 995 DL Mbps P=8; BPi-R4 Pro single-link 5 GHz
> 160 MHz EHT 1335 UL / 1058 DL Mbps P=8; switch_usb_mode=N forces
> USB 2 at 255 UL / 311 DL Mbps. Detail in the rtw89-usb3-gap repo
> above.
>
> Adding the BE-gen switch-mode to mainline today cannot yet help
> RTL8922AU users on its own, because mainline rtw89 has no
> in-kernel rtw89_8922au USB driver: RTL8922AU adapters do not
> attach to mainline at all. Switch-mode becomes load-bearing for
> BE-gen the moment the rtw89_8922au USB driver lands upstream;
> until then it would sit as dormant code. The path upstream for
> the switch-mode itself is either Bitterblue's Signed-off-by on
> c8a8ac49996b, or a Realtek developer carrying it as part of the
> broader 8922au USB enablement.
>
> (The AX-gen gap that this patch fixes does affect every mainline
> user with an RTL8852AU/BU/CU adapter today. BE-gen is a separate,
> strictly forward-looking concern.)
>
> Submission notes
> ================
>
> Applies cleanly on wireless-next HEAD 7baf5857e15d.
> checkpatch.pl --strict: zero errors, zero warnings, zero checks.
>
Realtek wifi patches should be based on rtw-next (or rtw if it's an
urgent bug fix):
https://github.com/pkshih/rtw/
The subject should include the tree: "[PATCH rtw-next 0/1]"
> Bitterblue Smith (1):
> wifi: rtw89: usb: Support switching to USB 3 mode
>
> drivers/net/wireless/realtek/rtw89/reg.h | 4 +++
> drivers/net/wireless/realtek/rtw89/usb.c | 41 ++++++++++++++++++++++++
> 2 files changed, 45 insertions(+)
>
> --
> 2.53.0
>
next prev parent reply other threads:[~2026-05-11 10:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 5:44 [PATCH 0/1] wifi: rtw89: usb: Support switching to USB 3 mode Lucid Duck
2026-05-08 5:44 ` [PATCH 1/1] " Lucid Duck
2026-05-08 6:59 ` Zenm Chen
2026-05-11 10:55 ` Bitterblue Smith [this message]
2026-05-11 16:08 ` [PATCH rtw-next v2 0/1] " Devin Wittmayer
2026-05-11 16:08 ` [PATCH rtw-next v2 1/1] " Devin Wittmayer
2026-05-11 17:26 ` Johannes Berg
2026-05-11 18:03 ` Devin Wittmayer
2026-05-12 1:25 ` Ping-Ke Shih
2026-05-11 18:14 ` Bitterblue Smith
2026-05-11 20:03 ` Devin Wittmayer
2026-05-11 22:27 ` Bitterblue Smith
2026-05-12 0:35 ` Devin Wittmayer
2026-05-12 8:48 ` Bitterblue Smith
2026-05-12 1:35 ` Ping-Ke Shih
2026-05-12 2:54 ` Devin Wittmayer
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=fe81de61-f22b-4331-9ef2-fe602f9880ea@gmail.com \
--to=rtl8821cerfe2@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lucid_duck@justthetip.ca \
--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