[PATCH] mac80211: add support for rtw88_8822bu
Hauke Mehrtens
hauke at hauke-m.de
Sun Oct 22 08:53:04 PDT 2023
On 10/22/23 12:31, Alexis Lothoré wrote:
> From: Alexis Lothoré <alexis.lothore at bootlin.com>
>
> Kernel 6.1 has introduced support for RTW8822BU network adapter, which
> is an USB variant of the rtw8822b 802.11ac chipset family.
>
> Build and install the corresponding module in the rtw88 package
>
> Signed-off-by: Alexis Lothoré <alexis.lothore at bootlin.com>
> ---
> This commit has been tested on Raspberry Pi 4 with an Archer T3U USB
> Nano Wifi dongle (8822BU). The resulting OpenWRT successfully acts as
> station or access point
> ---
> package/kernel/mac80211/realtek.mk | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/package/kernel/mac80211/realtek.mk b/package/kernel/mac80211/realtek.mk
> index 9c143583265e..4c618e6257c7 100644
> --- a/package/kernel/mac80211/realtek.mk
> +++ b/package/kernel/mac80211/realtek.mk
> @@ -21,8 +21,8 @@ config-y += RTL8XXXU_UNTESTED
> config-$(call config_package,rtl8723bs) += RTL8723BS
> config-y += STAGING
>
> -config-$(call config_package,rtw88) += RTW88 RTW88_CORE RTW88_PCI
> -config-y += RTW88_8822BE RTW88_8822CE RTW88_8723DE
> +config-$(call config_package,rtw88) += RTW88 RTW88_CORE RTW88_PCI RTW88_USB
> +config-y += RTW88_8822BE RTW88_8822BU RTW88_8822CE RTW88_8723DE
> config-$(CONFIG_PACKAGE_RTW88_DEBUG) += RTW88_DEBUG
> config-$(CONFIG_PACKAGE_RTW88_DEBUGFS) += RTW88_DEBUGFS
>
> @@ -168,18 +168,20 @@ endef
>
> define KernelPackage/rtw88
> $(call KernelPackage/mac80211/Default)
> - TITLE:=Realtek RTL8822BE/RTL8822CE/RTL8723DE
> + TITLE:=Realtek RTL8822BE/RTL8822BU/RTL8822CE/RTL8723DE
> DEPENDS+= @(PCI_SUPPORT) +kmod-mac80211 + at DRIVER_11AC_SUPPORT
> FILES:=\
> $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822be.ko \
> + $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822bu.ko \
> $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822b.ko \
> $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822ce.ko \
> $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822c.ko \
> $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723de.ko \
> $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723d.ko \
> $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_core.ko \
> - $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko
> - AUTOLOAD:=$(call AutoProbe,rtw88_8822be rtw88_8822ce rtw88_8723de)
> + $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko \
> + $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_usb.ko
> + AUTOLOAD:=$(call AutoProbe,rtw88_8822be rtw88_8822bu rtw88_8822ce rtw88_8723de)
> endef
>
> define KernelPackage/rtl8723bs
Currently this package only depends on PCI support, this also adds a
dependency to USB.
I think the beast approach is to split this into a core part with the
rtw88_core.ko and the rtw88_88*.ko files, one package with rtw88_pci.ko
and one with rtw88_usb.ko. Then you can install it on a system with only
USB and on a system with only PCIe support.
Hauke
More information about the openwrt-devel
mailing list