mac80211: realtek: add RTL8812au/RTL8821au support
authorMarty Jones <mj8263788@gmail.com>
Sun, 13 Oct 2024 21:15:53 +0000 (17:15 -0400)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 10 Dec 2024 00:06:10 +0000 (01:06 +0100)
This adds support for RTL8812au/RTL8821au USB adapters.
Run-tested: x86/64/rockchip
USB adapters tested: Alfa AWUS036ACS, D-Link DWA-171 A1.

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17079
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit ac8d30a645965ad4e1f1ca9b71e49613166b8a29)

package/kernel/mac80211/realtek.mk

index 4a6f10cddc51bbb012d003953aba07b3f7e2802b..6ac4b1aee9873cbfec1775ad335d4e91dd1ac545 100644 (file)
@@ -4,6 +4,7 @@ PKG_DRIVERS += \
        rtl8723bs rtl8821ae rtl8xxxu rtw88 rtw88-pci rtw88-usb rtw88-sdio rtw88-8821c \
        rtw88-8822b rtw88-8822c rtw88-8723x rtw88-8723d rtw88-8821ce rtw88-8821cu \
        rtw88-8822be rtw88-8822bu rtw88-8822ce rtw88-8822cu rtw88-8723de rtw88-8723ds \
+       rtw88-88xxa rtw88-8821a rtw88-8812a rtw88-8821au rtw88-8812au \
        rtw88-8723du rtw89 rtw89-pci rtw89-8851be rtw89-8852ae rtw89-8852b-common \
        rtw89-8852be rtw89-8852ce rtw89-8922ae
 
@@ -48,6 +49,11 @@ config-$(call config_package,rtw88-8723d) += RTW88_8723D
 config-$(call config_package,rtw88-8723de) += RTW88_8723DE
 config-$(call config_package,rtw88-8723ds) += RTW88_8723DS
 config-$(call config_package,rtw88-8723du) += RTW88_8723DU
+config-$(call config_package,rtw88-88xxa) += RTW88_88XXA
+config-$(call config_package,rtw88-8821a) += RTW88_8821A
+config-$(call config_package,rtw88-8812a) += RTW88_8812A
+config-$(call config_package,rtw88-8821au) += RTW88_8821AU
+config-$(call config_package,rtw88-8812au) += RTW88_8812AU
 config-$(CONFIG_PACKAGE_RTW88_DEBUG) += RTW88_DEBUG
 config-$(CONFIG_PACKAGE_RTW88_DEBUGFS) += RTW88_DEBUGFS
 
@@ -255,6 +261,33 @@ define KernelPackage/rtw88-usb
   HIDDEN:=1
 endef
 
+define KernelPackage/rtw88-88xxa
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=Realtek RTL8812A/RTL8821A family support
+  DEPENDS+= +@DRIVER_11AC_SUPPORT +kmod-rtw88-usb
+  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_88xxa.ko
+  AUTOLOAD:=$(call AutoProbe,rtw88_88xxa)
+  HIDDEN:=1
+endef
+
+define KernelPackage/rtw88-8821a
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=Realtek RTL8821A family support
+  DEPENDS+= +kmod-rtw88-88xxa
+  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8821a.ko
+  AUTOLOAD:=$(call AutoProbe,rtw88_8821a)
+  HIDDEN:=1
+endef
+
+define KernelPackage/rtw88-8812a
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=Realtek RTL8812A family support
+  DEPENDS+= +kmod-rtw88-88xxa
+  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8812a.ko
+  AUTOLOAD:=$(call AutoProbe,rtw88_8812a)
+  HIDDEN:=1
+endef
+
 define KernelPackage/rtw88-8821c
   $(call KernelPackage/mac80211/Default)
   TITLE:=Realtek RTL8821C family support
@@ -300,6 +333,22 @@ define KernelPackage/rtw88-8723d
   HIDDEN:=1
 endef
 
+define KernelPackage/rtw88-8821au
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=Realtek RTL8821AU support
+  DEPENDS+= +kmod-rtw88-8821a +rtl8821a-firmware
+  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8821au.ko
+  AUTOLOAD:=$(call AutoProbe,rtw88_8821au)
+endef
+
+define KernelPackage/rtw88-8812au
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=Realtek RTL8812AU support
+  DEPENDS+= +kmod-rtw88-8812a +rtl8812a-firmware
+  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8812au.ko
+  AUTOLOAD:=$(call AutoProbe,rtw88_8812au)
+endef
+
 define KernelPackage/rtw88-8821ce
   $(call KernelPackage/mac80211/Default)
   TITLE:=Realtek RTL8821CE support