Linux drivers for Realtek Wi-Fi 6/6E and Wi-Fi 7 adapters and cards
Find a file
Chia-Yuan Li 08b8d32693 wifi: rtw89: fw: use MAC source for IO offload delay command
The udelay/mdelay helpers set the command source to
RTW89_FW_CMD_OFLD_SRC_OTHER (4), which does not fit the two-bit field
RTW89_H2C_CMD_OFLD_W0_SRC (GENMASK(1, 0)). The le32_encode_bits() masks
it down to 0 (RTW89_FW_CMD_OFLD_SRC_BB), and compiler throws
__field_overflow() error. Fortunately it still works because firmware
ignores the source field for a delay command.

Use RTW89_FW_CMD_OFLD_SRC_MAC as the vendor driver does, and drop the
unused RTW89_FW_CMD_OFLD_SRC_OTHER enumerator.

Reported-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Closes: https://github.com/morrownr/rtw89/issues/111
Fixes: ae3d327515f2 ("wifi: rtw89: add IO offload support via firmware")
Signed-off-by: Chia-Yuan Li <leo.li@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
2026-07-14 20:10:54 +08:00
fedora feat(fedora): add akmod/kmod packaging for rpm-ostree systems (#105) 2026-07-08 21:14:35 +08:00
firmware rtw89: 8852b: update fw to v0.29.29.18 2026-06-16 10:40:23 +08:00
hostapd hostapd: Add config files for 8851B/8852A/8852B 2026-02-02 05:32:23 +08:00
.gitignore Add .gitignore to clean up "git status" output 2025-07-24 00:33:13 +03:00
acpi.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-26 20:10:31 +08:00
acpi.h wifi: rtw89: regd/acpi: support 6 GHz VLP policy via ACPI DSM 2025-07-20 00:34:38 +08:00
cam.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-26 20:06:59 +08:00
cam.h wifi: rtw89: fw: add DMAC v3 H2C command for RTL8922D 2026-01-28 23:40:03 +08:00
chan.c Fix build for kernel 6.8 2026-06-16 12:36:03 +08:00
chan.h wifi: rtw89: chan: introduce new helper to get entity current configuration 2026-06-16 09:45:08 +08:00
coex.c wifi: rtw89: coex: Limit Wi-Fi scan slot cost to avoid A2DP glitch 2025-09-22 21:20:03 +08:00
coex.h wifi: rtw89: coex: Implement Wi-Fi MLO related logic 2025-07-20 00:01:11 +08:00
core.c Fix build for kernel 6.18 2026-06-16 11:26:46 +08:00
core.h Revert "wifi: rtw89: pci: add quirks to avoid using PCI DAC for X99 board across chips" 2026-07-05 01:21:53 +08:00
debug.c wifi: rtw89: debug: show large MRU in txpwr_table dbgfs 2026-06-16 10:24:47 +08:00
debug.h wifi: rtw89: phy: handle C2H event for PS mode report 2026-01-29 00:41:29 +08:00
dkms.conf Update dkms.conf 2026-06-16 13:29:55 +08:00
efuse.c wifi: rtw89: retry efuse physical map dump on transient failure 2026-03-30 17:39:22 +08:00
efuse.h wifi: rtw89: efuse: read hardware version from efuse for WiFi 7 chips 2026-01-28 22:18:08 +08:00
efuse_be.c wifi: rtw89: efuse: read hardware version from efuse for WiFi 7 chips 2026-01-28 22:18:08 +08:00
fw.c wifi: rtw89: fw: use MAC source for IO offload delay command 2026-07-14 20:10:54 +08:00
fw.h wifi: rtw89: fw: use MAC source for IO offload delay command 2026-07-14 20:10:54 +08:00
mac.c wifi: rtw89: 8922d: add quota for RTL8922DE variant 2026-06-16 10:20:51 +08:00
mac.h wifi: rtw89: 8922d: add quota for RTL8922DE variant 2026-06-16 10:20:51 +08:00
mac80211.c wifi: rtw89: correct drop logic for malformed AMPDU frames 2026-06-16 10:18:50 +08:00
mac_be.c wifi: rtw89: clear auto K delay value before downloading firmware 2026-06-16 10:17:25 +08:00
Makefile Minor fixes 2026-05-01 09:56:11 +08:00
pci.c Revert "wifi: rtw89: pci: add quirks to avoid using PCI DAC for X99 board across chips" 2026-07-05 01:21:53 +08:00
pci.h wifi: rtw89: pci: disable PCI PHY error flag 8 2026-06-16 10:16:56 +08:00
pci_be.c wifi: rtw89: pci: disable PCI PHY error flag 8 2026-06-16 10:16:56 +08:00
phy.c wifi: rtw89: add debugfs entry of monitor mode options to capture HE-MU packets 2026-06-16 10:05:54 +08:00
phy.h wifi: rtw89: Wi-Fi 7 configure TX power limit for large MRU 2026-06-16 10:24:16 +08:00
phy_be.c wifi: rtw89: Wi-Fi 7 configure TX power limit for large MRU 2026-06-16 10:24:16 +08:00
ps.c wifi: rtw89: debug: disable inactive power save to reduce bus overhead 2026-06-16 09:35:59 +08:00
ps.h wifi: rtw89: mcc: clear normal flow NoA when MCC start 2025-07-19 23:56:22 +08:00
README.md Update README.md 2026-07-05 01:21:13 +08:00
reg.h wifi: rtw89: 8922d: configure TX shape settings 2026-06-16 10:25:19 +08:00
regd.c wifi: rtw89: usb: skip ACPI capability check for USB devices 2026-06-16 10:26:12 +08:00
rtw89.conf Blacklist Larry's rtw89 drivers 2025-08-27 08:28:25 +08:00
rtw8851b.c wifi: rtw89: mac: consolidate quota into a struct for variant chips 2026-06-16 10:20:21 +08:00
rtw8851b.h wifi: rtw89: 8851b: add to parse efuse content 2023-10-21 10:41:46 -05:00
rtw8851b_rfk.c wifi: rtw89: Replace hardcoded strings with helper functions 2025-11-22 11:59:08 +08:00
rtw8851b_rfk.h Upload newer rtw89 driver from linux 6.12-rc7 2024-11-13 03:22:34 +08:00
rtw8851b_rfk_table.c wifi: rtw89: 8851b: rfk: update IQK to 0x14 2025-07-20 00:30:20 +08:00
rtw8851b_rfk_table.h wifi: rtw89: 8851b: rfk: update IQK to 0x14 2025-07-20 00:30:20 +08:00
rtw8851b_table.c wifi: rtw89: 8851b: update NCTL 0xB 2025-07-20 00:29:12 +08:00
rtw8851b_table.h wifi: rtw89: indicate TX power by rate table inside RFE parameter 2023-10-21 10:41:48 -05:00
rtw8851be.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
rtw8851bu.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
rtw8852a.c wifi: rtw89: mac: consolidate quota into a struct for variant chips 2026-06-16 10:20:21 +08:00
rtw8852a.h Upload newer rtw89 driver from linux 6.12-rc7 2024-11-13 03:22:34 +08:00
rtw8852a_rfk.c wifi: rtw89: 8852a: correct field mask of reset DAC/ADC FIFO 2025-11-22 12:31:14 +08:00
rtw8852a_rfk.h Upload newer rtw89 driver from linux 6.12-rc7 2024-11-13 03:22:34 +08:00
rtw8852a_rfk_table.c rtw89: refine naming of rfk helpers with prefix 2023-10-20 20:57:33 -05:00
rtw8852a_rfk_table.h rtw89: make rfk helpers common across chips 2023-10-20 20:57:33 -05:00
rtw8852a_table.c wifi: rtw89: 8852a: move DIG tables to rtw8852a.c 2026-04-04 10:54:44 +08:00
rtw8852a_table.h wifi: rtw89: 8852a: move DIG tables to rtw8852a.c 2026-04-04 10:54:44 +08:00
rtw8852ae.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
rtw8852au.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
rtw8852b.c wifi: rtw89: mac: consolidate quota into a struct for variant chips 2026-06-16 10:20:21 +08:00
rtw8852b.h Upload newer rtw89 driver from linux 6.12-rc7 2024-11-13 03:22:34 +08:00
rtw8852b_common.c wifi: rtw89: read chip ID for RTL8922D variants 2026-01-28 22:18:50 +08:00
rtw8852b_common.h Upload newer rtw89 driver from linux 6.12-rc7 2024-11-13 03:22:34 +08:00
rtw8852b_rfk.c wifi: rtw89: chan: introduce new helper to get entity current configuration 2026-06-16 09:45:08 +08:00
rtw8852b_rfk.h wifi: rtw89: 8852b: implement RFK multi-channel handling and support chanctx up to 2 2025-07-20 02:49:58 +08:00
rtw8852b_rfk_table.c wifi: rtw89: 8852b: add tables for RFK 2023-10-21 10:41:45 -05:00
rtw8852b_rfk_table.h wifi: rtw89: 8852b: add tables for RFK 2023-10-21 10:41:45 -05:00
rtw8852b_table.c wifi: rtw89: 8852b: update TX power tables to R36 2024-01-10 09:29:04 -06:00
rtw8852b_table.h wifi: rtw89: indicate TX power by rate table inside RFE parameter 2023-10-21 10:41:48 -05:00
rtw8852be.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
rtw8852bt.c wifi: rtw89: mac: consolidate quota into a struct for variant chips 2026-06-16 10:20:21 +08:00
rtw8852bt.h Upload newer rtw89 driver from linux 6.12-rc7 2024-11-13 03:22:34 +08:00
rtw8852bt_rfk.c wifi: rtw89: chan: introduce new helper to get entity current configuration 2026-06-16 09:45:08 +08:00
rtw8852bt_rfk.h wifi: rtw89: 8852bt: implement RFK multi-channel handling and support chanctx up to 2 2025-07-20 00:44:53 +08:00
rtw8852bt_rfk_table.c Upload newer rtw89 driver from linux 6.12-rc7 2024-11-13 03:22:34 +08:00
rtw8852bt_rfk_table.h Upload newer rtw89 driver from linux 6.12-rc7 2024-11-13 03:22:34 +08:00
rtw8852bte.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
rtw8852bu.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
rtw8852c.c Fix build for kernel 6.8 2026-06-16 12:36:03 +08:00
rtw8852c.h Fix build for kernel 6.8 2026-06-16 12:36:03 +08:00
rtw8852c_rfk.c wifi: rtw89: 8852c: fix ADC oscillation in 160MHz affecting RX performance 2025-11-22 12:04:23 +08:00
rtw8852c_rfk.h Upload newer rtw89 driver from linux 6.12-rc7 2024-11-13 03:22:34 +08:00
rtw8852c_rfk_table.c wifi: rtw89: 8852c: Fix TSSI causes transmit power inaccuracy 2023-10-21 10:41:47 -05:00
rtw8852c_rfk_table.h rtw89: 8852c: rfk: add RFK tables 2023-10-20 20:57:34 -05:00
rtw8852c_table.c wifi: rtw89: 8852c: update TX power tables to R69.1 (2 of 2) 2024-04-22 13:05:14 -05:00
rtw8852c_table.h wifi: rtw89: indicate TX power by rate table inside RFE parameter 2023-10-21 10:41:48 -05:00
rtw8852ce.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
rtw8852cu.c Fix build for kernel 6.8 2026-06-16 12:36:03 +08:00
rtw8922a.c wifi: rtw89: mac: consolidate quota into a struct for variant chips 2026-06-16 10:20:21 +08:00
rtw8922a.h Introduce the rtw89 driver in linux 6.14 2025-01-15 08:59:38 +08:00
rtw8922a_rfk.c wifi: rtw89: chan: introduce new helper to get entity current configuration 2026-06-16 09:45:08 +08:00
rtw8922a_rfk.h Upload newer rtw89 driver from linux 6.12-rc7 2024-11-13 03:22:34 +08:00
rtw8922ae.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
rtw8922au.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
rtw8922d.c wifi: rtw89: 8922d: configure TX shape settings 2026-06-16 10:25:19 +08:00
rtw8922d.h wifi: rtw89: 8922d: add chip_info and chip_ops struct 2026-04-04 11:43:00 +08:00
rtw8922d_rfk.c wifi: rtw89: 8922d: update RF calibration flow for MLD 2026-06-16 09:45:46 +08:00
rtw8922d_rfk.h wifi: rtw89: 8922d: update RF calibration flow for MLD 2026-06-16 09:45:46 +08:00
rtw8922de.c wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk control 2026-06-16 10:26:43 +08:00
sar.c wifi: rtw89: usb: skip ACPI capability check for USB devices 2026-06-16 10:26:12 +08:00
sar.h wifi: rtw89: 8922a: add TAS feature support 2025-09-22 22:12:29 +08:00
ser.c wifi: rtw89: mac: add specific case to dump mac memory for RTL8922D 2026-04-04 11:34:09 +08:00
ser.h rtw89: add Realtek 802.11ax driver 2023-10-20 20:57:32 -05:00
txrx.h Fix build for kernel 6.18 2026-06-16 11:26:46 +08:00
usb.c Fix build for kernel 6.8 2026-06-16 12:36:03 +08:00
usb.h [v2] wifi: rtw89: usb: Enable RX aggregation for RTL8922AU 2026-04-30 23:45:43 +08:00
usb_storage.conf Update README.md, dkms.conf and usb_storage.conf 2026-01-29 04:44:41 +08:00
util.c Introduce the rtw89 driver in kernel 6.15 2025-03-14 17:21:35 +08:00
util.h wifi: rtw89: Drop malformed AMPDU frames with abnormal PN 2026-04-04 11:17:45 +08:00
wow.c wifi: rtw89: Drop malformed AMPDU frames with abnormal PN 2026-04-04 11:17:45 +08:00
wow.h wifi: rtw89: Drop malformed AMPDU frames with abnormal PN 2026-04-04 11:17:45 +08:00

The Mission of this Repo:

To code, test and upstream great quality Linux Standards compliant (mac80211) USB WiFi drivers for the Realtek RTW89 driver series.

Compatibility

Compatible with Linux kernel versions 6.6 and newer as long as your distro hasn't modified any kernel APIs. RHEL and all distros based on RHEL will have modified kernel APIs and are unlikely to be compatible with this driver.

Supported chips

  • USB : RTL8831BU, RTL8851BU, RTL8832AU, RTL8852AU, RTL8832BU, RTL8852BU
  • USB : RTL8832CU, RTL8852CU, RTL8912AU, RTL8922AU
  • PCIe: RTL8851BE, RTL8852AE, RTL8852BE(-VS, -VT), RTL8852CE, RTL8922AE(-VS)

Note: If you own a USB WiFi adapter with any of the above supported chips and your adapter is single-state (no Windows driver on board) and single-function (no bluetooth support), please start an issue and post the brand, name and chip of your adapter as well as a link to the product. This will allow us to make a list of preferred adapters.

Prerequisites

git, make, gcc, kernel-headers, dkms and mokutil (dkms and mokutil are optional.)

Installation Guide

  1. Create a clone of this repo in your local machine

    git clone https://github.com/morrownr/rtw89
    
  2. Change the working directory to rtw89

    cd rtw89
    
  3. Search and remove previously installed out-of-kernel rtw89 drivers. If your system has Larry's rtw89 driver installed, you must run this command to remove it, or this driver won't work as expected.

    sudo make cleanup_target_system
    
  4. Build and install the driver

    • via dkms (Recommended especially if Secure Boot is enabled in your system)

      sudo dkms install $PWD
      
    • via make (In this way you will have to manually reinstall the driver after each kernel update)

      make clean modules && sudo make install
      
  5. Install the firmware necessary for the driver

    sudo make install_fw
    
  6. Copy the configuration file rtw89.conf to /etc/modprobe.d/

    sudo cp -v rtw89.conf /etc/modprobe.d/
    

    Note: The above step will blacklist in-kernel drivers that can conflict with drivers in this repo.

  7. Enroll the MOK (Machine Owner Key). This is needed ONLY IF Secure Boot is enabled in your system. Please see this guide for details.

    sudo mokutil --import /var/lib/dkms/mok.pub
    

    For Ubuntu-based distro users, run this command instead.

    sudo mokutil --import /var/lib/shim-signed/mok/MOK.der
    

Uninstallation Guide

For users who installed the driver via DKMS,

  1. Check the version of the rtw89 driver installed in your system.
sudo dkms status rtw89
  1. Remove the rtw89 driver and its source code (Change the driver version accordingly)
sudo dkms remove rtw89/6.15 --all
sudo rm -rf /usr/src/rtw89-6.15
  1. Remove the configuration file
sudo rm -f /etc/modprobe.d/rtw89.conf

For users who installed the driver via make, run these commands in the rtw89 source directory

sudo make uninstall
sudo rm -f /etc/modprobe.d/rtw89.conf

Q&A

Q1. Bluetooth is still not working after installing this driver, why?

The rtw89 driver is the Wi-Fi driver for Realtek Wi-Fi 6/7 adapters and has nothing to do with Bluetooth. Open a new issue and share the output of the command sudo cat /sys/kernel/debug/usb/devices with us if you run into a Bluetooth problem.

Q2. How to update the driver installed via DKMS?

  1. Check the version of the rtw89 driver installed in your system.

    sudo dkms status rtw89
    
  2. Remove the rtw89 driver. (Change the driver version accordingly)

    sudo dkms remove rtw89/6.15 --all
    
    sudo rm -rf /usr/src/rtw89-6.15/
    
  3. Run this command in the rtw89 source directory to pull the latest code

    git pull
    
  4. Build, sign and install the rtw89 driver from the latest code.

    sudo dkms install $PWD
    

Q3. How to update the driver installed via make?

  1. Run this command in the rtw89 source directory to pull the latest code

     git pull
    
  2. Rebuild and reinstall the driver from the latest code

    make clean modules && sudo make install
    

Q4. How to update the firmware in my system?

  1. Run this command in the rtw89 source directory to pull the latest code and firmware

    git pull
    
  2. Update the firmware files in your system

    sudo make install_fw
    

Q5. I see my USB Wi-Fi adapter is in Driver CDROM Mode when running lsusb, what should I do?

Install usb-modeswitch (or usb_modeswitch), a tool that can switch your adapter to Wi-Fi mode.

Q6. My computer takes a very long time to boot when the Wi-Fi dongle is pre-inserted, how to fix it?

  1. Copy usb_storage.conf to /etc/modprobe.d/. This file will tell the culprit usb_storage not to touch the Wi-Fi dongles.

    sudo cp usb_storage.conf /etc/modprobe.d/
    
  2. Regenerate initramfs images. The following command is only applicable to Debian/Ubuntu and their variants. Please consult the manual if you are running other distros.

    sudo update-initramfs -u -k all
    

Q7. My computer only provides USB 3.x ports. How can I make my USB wireless adapter work in USB 2.0 mode?

  1. Open /etc/modprobe.d/rtw89.conf with a text editor.

  2. Change the value of the module parameter switch_usb_mode from 'y' to 'n'. Changing this value to 'n' tells the rtw89 driver not to perform USB mode switching, so the USB wireless adapter will work in USB 2.0 mode.

  3. Remove the USB wireless adapter from your computer.

  4. Reboot your computer (or unload the rtw89 driver completely, if you know how).

  5. Plug your USB wireless adapter back into the computer.

  6. Run "lsusb -t" to check what mode the USB wireless adapter is in.

Q8. My Realtek PCIe wireless card on a Lenovo or HP laptop is not working well, any solution?

Please try the workaround here

Q9. My Realtek PCIe wireless card on an Intel X99 machine doesn't work, how to fix it?

Please apply this patch and build/install the patched rtw89 driver.

The Main Menu for this site contains a lot of information regarding USB WiFi Adapters

https://github.com/morrownr/USB-WiFi