lwfinger / rtl8852au

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rocky Linux 9.4 - "Unknown symbol in module, or unknown parameter (see dmesg)" Observed After sudo modprobe 8852au

metalllinux opened this issue · comments

OS
Rocky Linux 9.4
Kernel

uname -r
5.14.0-427.20.1.el9_4.x86_64

Device

  • TP Link Archer AX1800 TX20U Wireless USB Dongle.
lsusb output
Bus 005 Device 004: ID 35bc:0100 Realtek 802.11ac WLAN Adapter

Reproduction Steps

  • Cloned the repo.
git clone git://github.com/lwfinger/rtl8852au.git
cd rtl8852au
  • Installed the required kernel headers and development tools.
sudo dnf install kernel-headers kernel-devel
sudo dnf -y groupinstall 'Development Tools'
  • Enabled the EPEL repository.
sudo dnf install epel-release
  • Installed dkms.
sudo dnf install dkms
  • Overwrote the following files with the ones that were very kindly provided by @virer in PR #72 for the RHEL 9 build support.
    *include/osdep_service_linux.h
    *os_dep/linux/ioctl_cfg80211.c
    *os_intfs.c
  • When running make, I received the following error:
make
#rm -f .symvers.8852au
make ARCH=x86_64 CROSS_COMPILE= -C /usr/src/kernels/5.14.0-427.20.1.el9_4.x86_64/ M=/home/test/rtl8852au  modules
make[1]: Entering directory '/usr/src/kernels/5.14.0-427.20.1.el9_4.x86_64'
  CC [M]  /home/test/rtl8852au/os_dep/linux/ioctl_cfg80211.o
/home/test/rtl8852au/os_dep/linux/ioctl_cfg80211.c:10277:26: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_ap_update *)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_beacon_data *)’ [-Werror=incompatible-pointer-types]
10277 |         .change_beacon = cfg80211_rtw_change_beacon,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/test/rtl8852au/os_dep/linux/ioctl_cfg80211.c:10277:26: note: (near initialization for ‘rtw_cfg80211_ops.change_beacon’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:299: /home/test/rtl8852au/os_dep/linux/ioctl_cfg80211.o] Error 1
make[1]: *** [Makefile:1934: /home/test/rtl8852au] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.14.0-427.20.1.el9_4.x86_64'
make: *** [Makefile:639: modules] Error 2
  • Opening the file and then scrolling to line 10277, I then removed the following block and saved the file.
10271 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) && !defined(COMPAT_KERNEL_RELEASE)
10272         .add_beacon = cfg80211_rtw_add_beacon,
10273         .set_beacon = cfg80211_rtw_set_beacon,
10274         .del_beacon = cfg80211_rtw_del_beacon,
10275 #else
10276         .start_ap = cfg80211_rtw_start_ap,
10277         .change_beacon = cfg80211_rtw_change_beacon,
10278         .stop_ap = cfg80211_rtw_stop_ap,
10279 #endif
  • I then edited the Makefile to add the direct link to the location of my source files, otherwise further compilation errors would arise.
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C /usr/src/kernels/5.14.0-427.20.1.el9_4.x86_64/ M=$(shell pwd)  modules
  • I then added the repo to dkms.
sudo dkms add .
  • I built the module.
sudo dkms build -m rtl8852au -v 1.15.0.1 --kernelsourcedir /usr/src/kernels/5.14.0-427.20.1.el9_4.x86_64/
  • I installed the module with sudo dkms install -m rtl8852au -v 1.15.0.1 --kernelsourcedir /usr/src/kernels/5.14.0-427.20.1.el9_4.x86_64/ and received multiple warnings about unknown symbols.
sudo dkms install -m rtl8852au -v 1.15.0.1 --kernelsourcedir /usr/src/kernels/5.14.0-427.20.1.el9_4.x86_64/ --force
Module rtl8852au-1.15.0.1 for kernel 5.14.0-427.20.1.el9_4.x86_64 (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.
Removing any linked weak-modules
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_del_sta_sinfo
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol ieee80211_freq_khz_to_channel
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_vendor_cmd_reply
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_ibss_joined
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_ch_switch_notify
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol ieee80211_get_channel_khz
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_ready_on_channel
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_inform_bss_frame_data
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_scan_done
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol __cfg80211_alloc_reply_skb
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_new_sta
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol wiphy_new_nm
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_roamed
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_mgmt_tx_status_ext
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol wiphy_unregister
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_remain_on_channel_expired
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_put_bss
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_rx_mgmt_ext
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_unlink_bss
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_disconnected
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol __cfg80211_send_event_skb
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_michael_mic_failure
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_external_auth_request
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_connect_done
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol wiphy_register
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol wiphy_free
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_get_bss
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol cfg80211_ch_switch_started_notify
depmod: WARNING: /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz needs unknown symbol __cfg80211_alloc_event_skb
  • Running modprobe observed the following.
sudo modprobe -vvv 8852au
modprobe: INFO: custom logging function 0x5604e1b5f840 registered
insmod /lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz 
modprobe: INFO: Failed to insert module '/lib/modules/5.14.0-427.20.1.el9_4.x86_64/extra/8852au.ko.xz': No such file or directory
modprobe: ERROR: could not insert '8852au': Unknown symbol in module, or unknown parameter (see dmesg)
modprobe: INFO: context 0x5604e256d4b0 released
  • Same output as in dmesg as well:
[  678.093903] 8852au: loading out-of-tree module taints kernel.
[  678.096688] 8852au: module verification failed: signature and/or required key missing - tainting kernel
[  678.096771] 8852au: Unknown symbol cfg80211_del_sta_sinfo (err -2)
[  678.096784] 8852au: Unknown symbol ieee80211_freq_khz_to_channel (err -2)
[  678.096812] 8852au: Unknown symbol cfg80211_vendor_cmd_reply (err -2)
[  678.096836] 8852au: Unknown symbol cfg80211_ibss_joined (err -2)
[  678.096862] 8852au: Unknown symbol cfg80211_ch_switch_notify (err -2)
[  678.096876] 8852au: Unknown symbol ieee80211_get_channel_khz (err -2)
[  678.096895] 8852au: Unknown symbol cfg80211_ready_on_channel (err -2)
[  678.096900] 8852au: Unknown symbol cfg80211_inform_bss_frame_data (err -2)
[  678.096917] 8852au: Unknown symbol cfg80211_scan_done (err -2)
[  678.096925] 8852au: Unknown symbol __cfg80211_alloc_reply_skb (err -2)
[  678.096929] 8852au: Unknown symbol cfg80211_new_sta (err -2)
[  678.096939] 8852au: Unknown symbol wiphy_new_nm (err -2)
[  678.096949] 8852au: Unknown symbol cfg80211_roamed (err -2)
[  678.096956] 8852au: Unknown symbol cfg80211_mgmt_tx_status_ext (err -2)
[  678.096967] 8852au: Unknown symbol wiphy_unregister (err -2)
[  678.096972] 8852au: Unknown symbol cfg80211_remain_on_channel_expired (err -2)
[  678.096997] 8852au: Unknown symbol cfg80211_put_bss (err -2)
[  678.097002] 8852au: Unknown symbol cfg80211_rx_mgmt_ext (err -2)
[  678.097009] 8852au: Unknown symbol cfg80211_unlink_bss (err -2)
[  678.097021] 8852au: Unknown symbol cfg80211_disconnected (err -2)
[  678.097033] 8852au: Unknown symbol __cfg80211_send_event_skb (err -2)
[  678.097039] 8852au: Unknown symbol cfg80211_michael_mic_failure (err -2)
[  678.097048] 8852au: Unknown symbol cfg80211_external_auth_request (err -2)
[  678.097054] 8852au: Unknown symbol cfg80211_connect_done (err -2)
[  678.097070] 8852au: Unknown symbol wiphy_register (err -2)
[  678.097074] 8852au: Unknown symbol wiphy_free (err -2)
[  678.097083] 8852au: Unknown symbol cfg80211_get_bss (err -2)
[  678.097093] 8852au: Unknown symbol cfg80211_ch_switch_started_notify (err -2)
[  678.097101] 8852au: Unknown symbol __cfg80211_alloc_event_skb (err -2)
[ 2140.030061] 8852au: Unknown symbol cfg80211_del_sta_sinfo (err -2)
[ 2140.030077] 8852au: Unknown symbol ieee80211_freq_khz_to_channel (err -2)
[ 2140.030103] 8852au: Unknown symbol cfg80211_vendor_cmd_reply (err -2)
[ 2140.030156] 8852au: Unknown symbol cfg80211_ibss_joined (err -2)
[ 2140.030195] 8852au: Unknown symbol cfg80211_ch_switch_notify (err -2)
[ 2140.030210] 8852au: Unknown symbol ieee80211_get_channel_khz (err -2)
[ 2140.030233] 8852au: Unknown symbol cfg80211_ready_on_channel (err -2)
[ 2140.030238] 8852au: Unknown symbol cfg80211_inform_bss_frame_data (err -2)
[ 2140.030255] 8852au: Unknown symbol cfg80211_scan_done (err -2)
[ 2140.030264] 8852au: Unknown symbol __cfg80211_alloc_reply_skb (err -2)
[ 2140.030268] 8852au: Unknown symbol cfg80211_new_sta (err -2)
[ 2140.030279] 8852au: Unknown symbol wiphy_new_nm (err -2)
[ 2140.030290] 8852au: Unknown symbol cfg80211_roamed (err -2)
[ 2140.030297] 8852au: Unknown symbol cfg80211_mgmt_tx_status_ext (err -2)
[ 2140.030310] 8852au: Unknown symbol wiphy_unregister (err -2)
[ 2140.030315] 8852au: Unknown symbol cfg80211_remain_on_channel_expired (err -2)
[ 2140.030340] 8852au: Unknown symbol cfg80211_put_bss (err -2)
[ 2140.030345] 8852au: Unknown symbol cfg80211_rx_mgmt_ext (err -2)
[ 2140.030353] 8852au: Unknown symbol cfg80211_unlink_bss (err -2)
[ 2140.030365] 8852au: Unknown symbol cfg80211_disconnected (err -2)
[ 2140.030377] 8852au: Unknown symbol __cfg80211_send_event_skb (err -2)
[ 2140.030383] 8852au: Unknown symbol cfg80211_michael_mic_failure (err -2)
[ 2140.030392] 8852au: Unknown symbol cfg80211_external_auth_request (err -2)
[ 2140.030398] 8852au: Unknown symbol cfg80211_connect_done (err -2)
[ 2140.030414] 8852au: Unknown symbol wiphy_register (err -2)
[ 2140.030418] 8852au: Unknown symbol wiphy_free (err -2)
[ 2140.030428] 8852au: Unknown symbol cfg80211_get_bss (err -2)
[ 2140.030438] 8852au: Unknown symbol cfg80211_ch_switch_started_notify (err -2)
[ 2140.030445] 8852au: Unknown symbol __cfg80211_alloc_event_skb (err -2)
  • Installing with make and sudo make install also had the same outcome.
  • @lwfinger - firstly, thank you very much for creating such a great project and all of the hard work you have put in.
  • If yourself or another member of the community is able to kindly assist with the above, that would be very appreciated please.
  • I would be more than happy to perform any testing as needed as well.

Hi @metalllinux ,
I just pushed a new version on the PR #72
this one builds against the latest Rocky 9.4 kernel with the latest modifications from this git repo.
I hope this will help you.

Hi @virer and that is excellent and thank you so much for the PR there. I will test it on a fresh Rocky 9.4 install and report back.

Hi @virer and to update on my progress.

  • Installed a fresh version of Rocky Linux 9.4.
  • Installed the kernel-headers and the Development Tools packages.
sudo dnf install -y kernel-headers kernel-devel
sudo dnf -y groupinstall 'Development Tools'
  • Pulled from your branch with your 3 commits.
wget https://github.com/virer/rtl8852au/archive/refs/heads/rhel9_support.zip
  • Unzipped the file.
unzip rhel9_support.zip
  • Changed into the directory.
cd rtl8852au-rhel9_support
  • Edited the line 640 of the Makefile, otherwise I would have build errors.
  • Original line.
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd)  modules
  • Changed line.
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C /usr/src/kernels/5.14.0-427.22.1.el9_4.x86_64/ M=/home/test/rtl8852au-rhel9_support  modules
  • Ran make
  • The compilation goes well, until this line regarding Skipping BTF generation.
BTF [M] /home/test/rtl8852au-rhel9_support/8852au.ko
Skipping BTF generation for /home/test/rtl8852au-rhel9_support/8852au.ko due to unavailability 
of vmlinux
  • Researching shows this is a common error, where vmlinux cannot be found.
  • Checked /lib/modules/5.14.0-427.13.1.el9_4.x86_64/ and there is a vmlinuz file.
-rwxr-xr-x.  1 root root 13605704 May  2 04:23 vmlinuz
  • I do have vmlinuz files in /boot and I am working out how to point make to these files.
lrwxrwxrwx. 1 root root        56 Jun 21 21:32 vmlinux.xz -> /usr/lib/modules/5.14.0-427.13.1.el9_4.x86_64/vmlinux.xz
-rwxr-xr-x. 1 root root  13605704 Jun 19 21:40 vmlinuz-0-rescue-8096775ab1c74798bcb5362b4a587e63
-rwxr-xr-x. 1 root root  13605704 May  2 04:23 vmlinuz-5.14.0-427.13.1.el9_4.x86_64
  • Ignore the symlink above, that was when I tried this Reddit post, however the outcome was the same when running ln -sf /usr/lib/modules/uname -r/vmlinux.xz /boot/
  • I am researching further how to solve the missing vmlinuz issue and will report back here with more findings.

Checked this Ubuntu post, which also exhibited the same Skipping BTF generation for errors and a user replied saying that it is not necessary an error and the driver can still build properly:

I don't believe this is an error. I believe that the facetimehd.ko is built and installed nonetheless. Are there any errors when you modprobe the driver?

Running modinfo 8852au observes the following:

[test@test ~]$ modinfo 8852au
filename:       /lib/modules/5.14.0-427.13.1.el9_4.x86_64/kernel/drivers/net/wireless/realtek/rtw89/8852au.ko
import_ns:      VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver
import_ns:      VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver
version:        v1.15.0.1-0-g487ee886.20210714
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
rhelversion:    9.4
srcversion:     2DFE36636F93D2C739DD456
alias:          usb:v056Ep4020d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2357p0141d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2357p0140d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2357p013Fd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v35BCp0100d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2001p3321d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2001p0141d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0411p0312d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0B05p1A62d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0B05p1997d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp885Cd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp885Ad*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp8832d*dc*dsc*dp*icFFiscFFipFFin*
depends:        cfg80211
retpoline:      Y
name:           8852au
vermagic:       5.14.0-427.22.1.el9_4.x86_64 SMP preempt mod_unload modversions 
parm:           rtw_wireless_mode:int
parm:           rtw_band_type:int
parm:           rtw_ips_mode:The default IPS mode (int)
parm:           rtw_lps_level:The default LPS level (int)
parm:           rtw_lps_chk_by_tp:int
parm:           rtw_max_bss_cnt:int
parm:           rtw_usb_rxagg_mode:int
parm:           rtw_dynamic_agg_enable:int
parm:           rtw_tx_bw_mode:The max tx bw for 2.4G and 5G. format is the same as rtw_bw_mode (uint)
parm:           rtw_max_amsdu_len:uint
parm:           rtw_rx_ampdu_sz_limit_1ss:RX AMPDU size limit for 1SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_rx_ampdu_sz_limit_2ss:RX AMPDU size limit for 2SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_rx_ampdu_sz_limit_3ss:RX AMPDU size limit for 3SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_rx_ampdu_sz_limit_4ss:RX AMPDU size limit for 4SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_vht_enable:int
parm:           rtw_vht_24g_enable:int
parm:           rtw_vht_rx_mcs_map:VHT RX MCS map (uint)
parm:           rtw_he_enable:int
parm:           rtw_rf_path:int
parm:           rtw_tx_nss:int
parm:           rtw_rx_nss:int
parm:           rtw_country_code:The default country code (in alpha2) (charp)
parm:           rtw_channel_plan:The default chplan ID when rtw_alpha2 is not specified or valid (int)
parm:           rtw_excl_chs:exclusive channel array (array of uint)
parm:           rtw_pci_dynamic_aspm_linkctrl:int
parm:           rtw_qos_opt_enable:int
parm:           ifname:The default name to allocate for first interface (charp)
parm:           if2name:The default name to allocate for second interface (charp)
parm:           rtw_vo_edca:uint
parm:           rtw_ap_src_b2u_flags:int
parm:           rtw_ap_fwd_b2u_flags:int
parm:           rtw_wowlan_sta_mix_mode:int
parm:           rtw_pwrtrim_enable:int
parm:           rtw_initmac:charp
parm:           rtw_chip_version:int
parm:           rtw_rfintfs:int
parm:           rtw_lbkmode:int
parm:           rtw_network_mode:int
parm:           rtw_channel:int
parm:           rtw_mp_mode:int
parm:           rtw_wmm_enable:int
parm:           rtw_vrtl_carrier_sense:int
parm:           rtw_vcs_type:int
parm:           rtw_hw_rts_en:int
parm:           rtw_busy_thresh:int
parm:           rtw_ht_enable:int
parm:           rtw_bw_mode:int
parm:           rtw_ampdu_enable:int
parm:           rtw_rx_stbc:int
parm:           rtw_rx_ampdu_amsdu:int
parm:           rtw_tx_ampdu_amsdu:int
parm:           rtw_quick_addba_req:int
parm:           rtw_beamform_cap:int
parm:           rtw_sw_proto_bf_cap_phy0:int
parm:           rtw_sw_proto_bf_cap_phy1:int
parm:           rtw_dyn_txbf:int
parm:           rtw_lowrate_two_xmit:int
parm:           rtw_power_mgnt:int
parm:           rtw_smart_ps:int
parm:           rtw_low_power:int
parm:           rtw_wifi_spec:int
parm:           rtw_full_ch_in_p2p_handshake:int
parm:           rtw_antdiv_cfg:int
parm:           rtw_antdiv_type:int
parm:           rtw_drv_ant_band_switch:int
parm:           rtw_single_ant_path:int
parm:           rtw_switch_usb_mode:int
parm:           rtw_hwpwrp_detect:int
parm:           rtw_hw_wps_pbc:int
parm:           rtw_check_hw_status:int
parm:           rtw_max_roaming_times:The max roaming times to try (uint)
parm:           rtw_hiq_filter:0:allow all, 1:allow special, 2:deny all (uint)
parm:           rtw_adaptivity_en:0:disable, 1:enable (uint)
parm:           rtw_adaptivity_mode:0:normal, 1:carrier sense (uint)
parm:           rtw_adaptivity_th_l2h_ini:th_l2h_ini for Adaptivity (int)
parm:           rtw_adaptivity_th_edcca_hl_diff:th_edcca_hl_diff for Adaptivity (int)
parm:           rtw_dfs_region_domain:0:UNKNOWN, 1:FCC, 2:MKK, 3:ETSI (uint)
parm:           rtw_amsdu_mode:0:non-spp, 1:spp, 2:all drop (uint)
parm:           rtw_amplifier_type_2g:BIT3:2G ext-PA, BIT4:2G ext-LNA (uint)
parm:           rtw_amplifier_type_5g:BIT6:5G ext-PA, BIT7:5G ext-LNA (uint)
parm:           rtw_rfe_type:default init value:64 (uint)
parm:           rtw_dbcc_en:0:Disable, 1:Enable DBCC (int)
parm:           rtw_powertracking_type:default init value:64 (uint)
parm:           rtw_GLNA_type:default init value:0 (uint)
parm:           rtw_TxBBSwing_2G:default init value:0xFF (uint)
parm:           rtw_TxBBSwing_5G:default init value:0xFF (uint)
parm:           rtw_OffEfuseMask:default open Efuse Mask value:0 (uint)
parm:           rtw_FileMaskEfuse:default drv Mask Efuse value:0 (uint)
parm:           rtw_rxgain_offset_2g:default RF Gain 2G Offset value:0 (uint)
parm:           rtw_rxgain_offset_5gl:default RF Gain 5GL Offset value:0 (uint)
parm:           rtw_rxgain_offset_5gh:uint
parm:           rtw_rxgain_offset_5gm:default RF Gain 5GM Offset value:0 (uint)
parm:           rtw_pll_ref_clk_sel:force pll_ref_clk_sel, 0xF:use autoload value (uint)
parm:           rtw_tx_pwr_by_rate:0:Disable, 1:Enable, 2: Depend on efuse (int)
parm:           rtw_tx_pwr_lmt_enable:0:Disable, 1:Enable, 2: Depend on efuse (int)
parm:           rtw_target_tx_pwr_2g_a:2.4G target tx power (unit:dBm) of RF path A for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_2g_b:2.4G target tx power (unit:dBm) of RF path B for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_2g_c:2.4G target tx power (unit:dBm) of RF path C for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_2g_d:2.4G target tx power (unit:dBm) of RF path D for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_a:5G target tx power (unit:dBm) of RF path A for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_b:5G target tx power (unit:dBm) of RF path B for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_c:5G target tx power (unit:dBm) of RF path C for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_d:5G target tx power (unit:dBm) of RF path D for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_phy_file_path:The path of phy parameter (charp)
parm:           rtw_load_phy_file:PHY File Bit Map (int)
parm:           rtw_decrypt_phy_file:Enable Decrypt PHY File (int)
parm:           rtw_phydm_ability:uint
parm:           rtw_halrf_ability:uint
parm:           rtw_en_napi:int
parm:           rtw_en_gro:int
parm:           rtw_iqk_fw_offload:int
parm:           rtw_ch_switch_offload:int
parm:           rtw_en_dyn_rrsr:int
parm:           rtw_rrsr_value:int
parm:           rtw_scan_interval_thr:Threshold used to judge if scan request comes from scan UI, unit is ms. (uint)
parm:           rtw_roch_min_home_dur:uint
parm:           rtw_roch_max_away_dur:uint
parm:           rtw_roch_extend_dur:uint
  • The output looks good to me.
  • Loading the driver also has no issues.
[test@test ~]$ sudo modprobe 8852au
[sudo] password for test: 
[test@test ~]$
  • The output of dmesg after loading the driver with modprobe.
[    9.270085] Warning: Unmaintained driver is detected: ip_set
[    9.342466] Generic FE-GE Realtek PHY r8169-0-400:00: attached PHY driver (mii_bus:phy_addr=r8169-0-400:00, irq=MAC)
[    9.509746] r8169 0000:04:00.0 enp4s0: Link is Down
[   14.426439] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full - flow control rx/tx
[   14.426448] IPv6: ADDRCONF(NETDEV_CHANGE): enp4s0: link becomes ready
[   14.992009] block dm-0: the capability attribute has been deprecated.
[   17.031959] rfkill: input handler disabled
[   22.097454] rfkill: input handler enabled
[   23.895194] rfkill: input handler disabled
[  765.478088] usb 1-1: new high-speed USB device number 8 using xhci_hcd
[  765.604493] usb 1-1: New USB device found, idVendor=35bc, idProduct=0100, bcdDevice= 0.00
[  765.604496] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  765.604497] usb 1-1: Product: 802.11ac WLAN Adapter
[  765.604498] usb 1-1: Manufacturer: Realtek
[  765.604498] usb 1-1: SerialNumber: 00e04c000001
  • I have also tried different USB ports and occasionally it will register the wireless dongle as a disk. An example dmesg output.
[  764.033075] usb 1-1: new high-speed USB device number 7 using xhci_hcd
[  764.159390] usb 1-1: New USB device found, idVendor=0bda, idProduct=1a2b, bcdDevice= 0.00
[  764.159392] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  764.159394] usb 1-1: Product: DISK
[  764.159395] usb 1-1: Manufacturer: Realtek
[  764.160372] usb-storage 1-1:1.0: USB Mass Storage device detected
[  764.160670] scsi host4: usb-storage 1-1:1.0
[  764.750624] usb 1-1: USB disconnect, device number **7**
  • Checking post #6, I also need to create a udev rule:

Then, I wrote a script to load the driver and switch the device from "Flash disk mode(default) to active adapter mode", as the official drivers put it. Respect to D-Link for providing official Linux drivers, but, well, they don't work. The repo above did. Anyway, here's the script, which is at /usr/local/bin/dwa171:
Code:
#!/usr/bin/env bash
/usr/sbin/modprobe 8821cu
/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b > /dev/null
And then I wrote a udev rule to load that script when the adapter is detected. It's at /etc/udev/rules.d/99-dwa171.rules
Code:
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="1a2b", RUN+="/usr/local/bin/dwa171"

  • I then created a udev rule in /etc/udev/rules.d/99-tplink-wireless-dongle.rules and added the following line from the README file on this repository.
ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="usb_modeswitch '/%k'"
  • I reloaded the udev rules with udevadm control --reload.
  • Even after a full reboot, the wireless dongle is not detected.
  • I even tried sudo modprobe 8852au then sudo /usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b > /dev/null with no luck.
  • Installed a fresh version of Ubuntu 22.04.
  • Made sure both the build dependencies were installed.
sudo apt install linux-headers-$(uname -r)
sudo apt install build-essential
  • Also needed to install gcc-12 and its dependencies.
sudo apt install gcc-12
  • Cloned the repository, changed directory and ran make.
git clone https://github.com/lwfinger/rtl8852au.git
cd rtl8852au
make
  • This compiled successfully with the same Skipping BTF generation errors, so I believe these are fine to ignore.
  BTF [M] /home/tesdt/rtl8852au/8852au.ko
Skipping BTF generation for /home/tesdt/rtl8852au/8852au.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-41-generic'
#cp Module.symvers .symvers.8852au
  • sudo make install also completed successfully.
tesdt@test:~/rtl8852au$ sudo make install
[sudo] password for tesdt: 
install -p -m 644 8852au.ko  /lib/modules/6.5.0-41-generic/kernel/drivers/net/wireless/realtek/rtw89/
/sbin/depmod -a 6.5.0-41-generic
  • The output of modinfo looks good.
tesdt@test:~/rtl8852au$ modinfo 8852au
filename:       /lib/modules/6.5.0-41-generic/kernel/drivers/net/wireless/realtek/rtw89/8852au.ko
import_ns:      VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver
import_ns:      VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver
version:        v1.15.0.1-0-g487ee886.20210714
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     0C7F76BD649BD1182457235
alias:          usb:v056Ep4020d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2357p0141d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2357p0140d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2357p013Fd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v35BCp0100d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2001p3321d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2001p0141d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0411p0312d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0B05p1A62d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0B05p1997d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp885Cd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp885Ad*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp8832d*dc*dsc*dp*icFFiscFFipFFin*
depends:        cfg80211
retpoline:      Y
name:           8852au
vermagic:       6.5.0-41-generic SMP preempt mod_unload modversions 
parm:           rtw_wireless_mode:int
parm:           rtw_band_type:int
parm:           rtw_ips_mode:The default IPS mode (int)
parm:           rtw_lps_level:The default LPS level (int)
parm:           rtw_lps_chk_by_tp:int
parm:           rtw_max_bss_cnt:int
parm:           rtw_usb_rxagg_mode:int
parm:           rtw_dynamic_agg_enable:int
parm:           rtw_tx_bw_mode:The max tx bw for 2.4G and 5G. format is the same as rtw_bw_mode (uint)
parm:           rtw_max_amsdu_len:uint
parm:           rtw_rx_ampdu_sz_limit_1ss:RX AMPDU size limit for 1SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_rx_ampdu_sz_limit_2ss:RX AMPDU size limit for 2SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_rx_ampdu_sz_limit_3ss:RX AMPDU size limit for 3SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_rx_ampdu_sz_limit_4ss:RX AMPDU size limit for 4SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_vht_enable:int
parm:           rtw_vht_24g_enable:int
parm:           rtw_vht_rx_mcs_map:VHT RX MCS map (uint)
parm:           rtw_he_enable:int
parm:           rtw_rf_path:int
parm:           rtw_tx_nss:int
parm:           rtw_rx_nss:int
parm:           rtw_country_code:The default country code (in alpha2) (charp)
parm:           rtw_channel_plan:The default chplan ID when rtw_alpha2 is not specified or valid (int)
parm:           rtw_excl_chs:exclusive channel array (array of uint)
parm:           rtw_pci_dynamic_aspm_linkctrl:int
parm:           rtw_qos_opt_enable:int
parm:           ifname:The default name to allocate for first interface (charp)
parm:           if2name:The default name to allocate for second interface (charp)
parm:           rtw_vo_edca:uint
parm:           rtw_ap_src_b2u_flags:int
parm:           rtw_ap_fwd_b2u_flags:int
parm:           rtw_wowlan_sta_mix_mode:int
parm:           rtw_pwrtrim_enable:int
parm:           rtw_initmac:charp
parm:           rtw_chip_version:int
parm:           rtw_rfintfs:int
parm:           rtw_lbkmode:int
parm:           rtw_network_mode:int
parm:           rtw_channel:int
parm:           rtw_mp_mode:int
parm:           rtw_wmm_enable:int
parm:           rtw_vrtl_carrier_sense:int
parm:           rtw_vcs_type:int
parm:           rtw_hw_rts_en:int
parm:           rtw_busy_thresh:int
parm:           rtw_ht_enable:int
parm:           rtw_bw_mode:int
parm:           rtw_ampdu_enable:int
parm:           rtw_rx_stbc:int
parm:           rtw_rx_ampdu_amsdu:int
parm:           rtw_tx_ampdu_amsdu:int
parm:           rtw_quick_addba_req:int
parm:           rtw_beamform_cap:int
parm:           rtw_sw_proto_bf_cap_phy0:int
parm:           rtw_sw_proto_bf_cap_phy1:int
parm:           rtw_dyn_txbf:int
parm:           rtw_lowrate_two_xmit:int
parm:           rtw_power_mgnt:int
parm:           rtw_smart_ps:int
parm:           rtw_low_power:int
parm:           rtw_wifi_spec:int
parm:           rtw_full_ch_in_p2p_handshake:int
parm:           rtw_antdiv_cfg:int
parm:           rtw_antdiv_type:int
parm:           rtw_drv_ant_band_switch:int
parm:           rtw_single_ant_path:int
parm:           rtw_switch_usb_mode:int
parm:           rtw_hwpwrp_detect:int
parm:           rtw_hw_wps_pbc:int
parm:           rtw_check_hw_status:int
parm:           rtw_max_roaming_times:The max roaming times to try (uint)
parm:           rtw_hiq_filter:0:allow all, 1:allow special, 2:deny all (uint)
parm:           rtw_adaptivity_en:0:disable, 1:enable (uint)
parm:           rtw_adaptivity_mode:0:normal, 1:carrier sense (uint)
parm:           rtw_adaptivity_th_l2h_ini:th_l2h_ini for Adaptivity (int)
parm:           rtw_adaptivity_th_edcca_hl_diff:th_edcca_hl_diff for Adaptivity (int)
parm:           rtw_dfs_region_domain:0:UNKNOWN, 1:FCC, 2:MKK, 3:ETSI (uint)
parm:           rtw_amsdu_mode:0:non-spp, 1:spp, 2:all drop (uint)
parm:           rtw_amplifier_type_2g:BIT3:2G ext-PA, BIT4:2G ext-LNA (uint)
parm:           rtw_amplifier_type_5g:BIT6:5G ext-PA, BIT7:5G ext-LNA (uint)
parm:           rtw_rfe_type:default init value:64 (uint)
parm:           rtw_dbcc_en:0:Disable, 1:Enable DBCC (int)
parm:           rtw_powertracking_type:default init value:64 (uint)
parm:           rtw_GLNA_type:default init value:0 (uint)
parm:           rtw_TxBBSwing_2G:default init value:0xFF (uint)
parm:           rtw_TxBBSwing_5G:default init value:0xFF (uint)
parm:           rtw_OffEfuseMask:default open Efuse Mask value:0 (uint)
parm:           rtw_FileMaskEfuse:default drv Mask Efuse value:0 (uint)
parm:           rtw_rxgain_offset_2g:default RF Gain 2G Offset value:0 (uint)
parm:           rtw_rxgain_offset_5gl:default RF Gain 5GL Offset value:0 (uint)
parm:           rtw_rxgain_offset_5gh:uint
parm:           rtw_rxgain_offset_5gm:default RF Gain 5GM Offset value:0 (uint)
parm:           rtw_pll_ref_clk_sel:force pll_ref_clk_sel, 0xF:use autoload value (uint)
parm:           rtw_tx_pwr_by_rate:0:Disable, 1:Enable, 2: Depend on efuse (int)
parm:           rtw_tx_pwr_lmt_enable:0:Disable, 1:Enable, 2: Depend on efuse (int)
parm:           rtw_target_tx_pwr_2g_a:2.4G target tx power (unit:dBm) of RF path A for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_2g_b:2.4G target tx power (unit:dBm) of RF path B for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_2g_c:2.4G target tx power (unit:dBm) of RF path C for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_2g_d:2.4G target tx power (unit:dBm) of RF path D for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_a:5G target tx power (unit:dBm) of RF path A for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_b:5G target tx power (unit:dBm) of RF path B for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_c:5G target tx power (unit:dBm) of RF path C for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_d:5G target tx power (unit:dBm) of RF path D for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_phy_file_path:The path of phy parameter (charp)
parm:           rtw_load_phy_file:PHY File Bit Map (int)
parm:           rtw_decrypt_phy_file:Enable Decrypt PHY File (int)
parm:           rtw_phydm_ability:uint
parm:           rtw_halrf_ability:uint
parm:           rtw_en_napi:int
parm:           rtw_en_gro:int
parm:           rtw_iqk_fw_offload:int
parm:           rtw_ch_switch_offload:int
parm:           rtw_en_dyn_rrsr:int
parm:           rtw_rrsr_value:int
parm:           rtw_scan_interval_thr:Threshold used to judge if scan request comes from scan UI, unit is ms. (uint)
parm:           rtw_roch_min_home_dur:uint
parm:           rtw_roch_max_away_dur:uint
parm:           rtw_roch_extend_dur:uint
  • The driver is correctly registered after modprobe 8852au. Here is the output from dmesg.
[ 2434.733849] 8852au: loading out-of-tree module taints kernel.
[ 2434.733879] 8852au: module verification failed: signature and/or required key missing - tainting kernel
[ 2435.052488] usbcore: registered new interface driver rtl8852au
  • Plugging in the wireless dongle still sees it not recognised.
  • Created a udev rule under /etc/udev/rules.d/99-tplink-wireless.rules.
  • Made sure the idVendor and idProductmatched the output indmesg`.
ATTR{idVendor}=="35bc", ATTR{idProduct}=="0100", RUN+="usb_modeswitch '/%k'"
  • Output of dmesg.
[  118.728746] usb-storage 5-2:1.0: USB Mass Storage device detected
[  118.729011] scsi host4: usb-storage 5-2:1.0
[  119.330248] usb 5-2: USB disconnect, device number 3
[  120.069349] usb 5-2: new high-speed USB device number 4 using xhci_hcd
[  120.217842] usb 5-2: New USB device found, idVendor=35bc, idProduct=0100, bcdDevice= 0.00
[  120.217857] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  120.217863] usb 5-2: Product: 802.11ac WLAN Adapter
[  120.217868] usb 5-2: Manufacturer: Realtek
[  120.217872] usb 5-2: SerialNumber: 00e04c000001
  • Even after a reboot, the wireless dongle is still not recognised in the settings.
  • @virer and @lwfinger , good day to you both. Regarding having the wireless dongle recognised, I feel it is possibly an issue with my udev rules. For your udev rules, what was your configuration please?
  • So far I have had the same results in Ubuntu 22.04 as in Rocky Linux 9.4.

Very sorry to learn of Larry's passing via Phoronix. Thank you very much @lwfinger for the years of contributions made to wireless drivers on Linux.