Rtw89

From ThinkWiki
Revision as of 18:52, 9 January 2022 by TpUser0 (Talk | contribs) (initial page for rtw89)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

rtw89 is the Linux driver for Realtek 802.11ax WiFi devices starting with the Realtek 8852AE ASIC. Rather than updating the exiting rtw88 driver, Realtek engineers wrote and contributed a completely rewritten one for their redesigned wireless chipset of the 8852AE, which will be used in future Realtek WiFi chips as well.

The driver is part of wireless-drivers-next and will be included in Linux kernel 5.16. Patches for kernels 5.4 to 5.15 are available.

For example, the Lenovo ThinkPad P14s Gen2 series from 2021 requires the new driver.

Kernel patches

The patch series to get the rtw89 driver into the kernel sources requires the kernel and/or its modules to be compiled by the end-user, alternatively some distributions may provide a pre-compiled DKMS package for the driver as well.

One way to patch an existing kernel is to download the v6 patch from lore.kernel.org; It is sufficient to copy&paste the whole message into one files, e.g. rtw89v6.patch.

Alternatively, using links or lynx (example with links) the v6 patch series can be downloaded from lore.kernel.org from the shell:

# links -dump "https://lore.kernel.org/all/482cc641-7ba1-7d7a-f2eb-5d39aea9a5cd@lwfinger.net/T/" > /tmp/rtw89v6.patch

Applying the whole patch series to an existing kernel source tree:

$ cd /usr/src/linux
$ patch -p1 < /tmp/rtw89v6.patch

After patching the kernel the rtw89 driver is available for selection in the kernel configuration (example: make menuconfig):

     -> Device Drivers
       -> Network device support (NETDEVICES [=y])
         -> Wireless LAN (WLAN [=y])
           -> Realtek devices (WLAN_VENDOR_REALTEK [=y])
             -> Realtek 802.11ax wireless chips support (RTW89 [=m])
               -> Realtek 8852AE PCI wireless network adapter (RTW89_8852AE [=m])

After booting this kernel, the driver will be automatically loaded on compatible hardware.

$ lspci -d :8852 -nn
03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8852AE 802.11ax PCIe Wireless Network Adapter [10ec:8852]

External links

  • Phoronix article about initial rtw89 development
  • rtw89 GitHub repository