Cannot enable wireless card driver due to the conflict between backported mac80211 and kernel mainline mac80211

I've encountered a problem while trying to set up an x86 OpenWrt virtual machine (v22.03.4) to function as a software router. My goal is to use PCI passthrough to assign the host RTL8188EE wireless card to the guest and utilize it as the radio for my OpenWrt VM.

Unfortunately, the latest OpenWrt (v22.03.4) doesn't support RTL8188EE out of the box. However, it appears that the kernel mainline does support it, as mentioned on the Wiki (https://wireless.wiki.kernel.org/en/users/Drivers/rtl819x).

The issue I'm facing is that I can't enable RTL8188EE support during the make menuconfig process. However, I can enable it during make kernel_menuconfig, but doing so requires (and depends on) cfg80211 and mac80211. When I compile and install OpenWrt with these options enabled, I encounter the following error:

cfg80211: exports duplicate symbol __cfg80211_alloc_event_skb (owned by kernel)

This error prevents cfg80211, mac80211, rtlwifi, and support for RTL8188EE from being loaded into the kernel.

Upon further investigation, I found that OpenWrt uses a backported version of mac80211 and cfg80211 as separate packages, which conflicts with the mac80211 and cfg80211 in the kernel. However, disabling mac80211 and cfg80211 in make kernel_menuconfig would result in the inability to enable RTL8188EE support.

I'm looking for a solution to this issue. Any suggestions or guidance would be greatly appreciated. Thank you!

First of all, don't expect too much, Realtek wireless hardware on Linux is… difficult…

Only do development on master, which gives you kernel v5.15 and v6.1 based wireless backports - which might be good enough for your card. There is no way (at all) to use the base kernel's wireless stack- and drivers, with OpenWrt you must (and can only-) work with the backports ("mac80211") supplied drivers. package/kernel/mac80211/realtek.mk will be your playground, make sure to enable/ package CONFIG_RTL8188EE as part of rtlwifi.

2 Likes