Difference between revisions of "Rtw89"

From ThinkWiki
Jump to: navigation, search
(initial page for rtw89)
 
(Kernel patches: modules loaded on 5.12.0...)
Line 8: Line 8:
 
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.
 
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 [https://lore.kernel.org/all/482cc641-7ba1-7d7a-f2eb-5d39aea9a5cd@lwfinger.net/T/ lore.kernel.org]; It is sufficient to copy&paste the whole message into one files, e.g. rtw89v6.patch.
+
One way to patch an existing kernel is to download the v6 patch from [https://lore.kernel.org/all/482cc641-7ba1-7d7a-f2eb-5d39aea9a5cd@lwfinger.net/T/ 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 the shell:
 
 
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
 
  # links -dump "https://lore.kernel.org/all/482cc641-7ba1-7d7a-f2eb-5d39aea9a5cd@lwfinger.net/T/" > /tmp/rtw89v6.patch
  
Line 17: Line 15:
 
  $ patch -p1 < /tmp/rtw89v6.patch
 
  $ patch -p1 < /tmp/rtw89v6.patch
  
After patching the kernel the rtw89 driver is available for selection in the kernel configuration (example: make menuconfig):
+
After patching the kernel, the rtw89 driver is available for selection in the kernel configuration (example: make menuconfig):
 
       -> Device Drivers
 
       -> Device Drivers
 
         -> Network device support (NETDEVICES [=y])
 
         -> Network device support (NETDEVICES [=y])
Line 26: Line 24:
  
 
After booting this kernel, the driver will be automatically loaded on compatible hardware.
 
After booting this kernel, the driver will be automatically loaded on compatible hardware.
 +
$ uname -r
 +
5.12.0
 
  $ lspci -d :8852 -nn
 
  $ lspci -d :8852 -nn
 
  03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8852AE 802.11ax PCIe Wireless Network Adapter [10ec:8852]
 
  03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8852AE 802.11ax PCIe Wireless Network Adapter [10ec:8852]
 +
$ lsmod | grep rtw89
 +
rtw89_pci              45056  0
 +
rtw89_core            880640  1 rtw89_pci
  
 
== External links ==
 
== External links ==

Revision as of 18:56, 9 January 2022

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 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.

$ uname -r
5.12.0
$ lspci -d :8852 -nn
03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8852AE 802.11ax PCIe Wireless Network Adapter [10ec:8852]
$ lsmod | grep rtw89
rtw89_pci              45056  0
rtw89_core            880640  1 rtw89_pci

External links

  • Phoronix article about initial rtw89 development
  • rtw89 GitHub repository