mac80211: add ath12k PCI support
authorJanusz Dziedzic <janusz.dziedzic@gmail.com>
Sat, 24 Feb 2024 11:10:56 +0000 (11:10 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Sep 2024 22:34:08 +0000 (00:34 +0200)
Add upstream ath12k 802.11BE driver support.
Allow to build and use it from openwrt.

Tested on BPI-R4/BPI-R64 with:
 - Qualcomm Technologies, Inc WCN785x Wi-Fi 7(802.11be) 320MHz 2x2 [FastConnect 7800] (rev 01)

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15945
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/kernel/mac80211/Makefile
package/kernel/mac80211/ath.mk

index aa022c9cd3671efbf68c14010ad4434ea63ab0a7..099bdae46fe1549e40192ec43f511867db332e9e 100644 (file)
@@ -348,6 +348,7 @@ define Build/Patch
        $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath9k,ath9k/)
        $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath10k,ath10k/)
        $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath11k,ath11k/)
+       $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath12k,ath12k/)
        $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/)
        $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mt7601u,mt7601u/)
        $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/)
@@ -364,6 +365,7 @@ define Quilt/Refresh/Package
        $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath9k,ath9k/)
        $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath10k,ath10k/)
        $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath11k,ath11k/)
+       $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath12k,ath12k/)
        $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/)
        $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mt7601u,mt7601u/)
        $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/)
index 41537a7fcc89733e081223e4247365c30f8ba1ed..f56fd7a961ccef355caa7d4ddb0c08d709055c57 100644 (file)
@@ -1,6 +1,6 @@
 PKG_DRIVERS += \
        ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-smallbuffers \
-       ath11k ath11k-ahb ath11k-pci carl9170 owl-loader ar5523 wil6210 qcom-qmi-helpers
+       ath11k ath11k-ahb ath11k-pci ath12k carl9170 owl-loader ar5523 wil6210 qcom-qmi-helpers
 
 PKG_CONFIG_DEPENDS += \
        CONFIG_PACKAGE_ATH_DEBUG \
@@ -21,6 +21,7 @@ ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
        ATH9K_HTC_DEBUGFS \
        ATH10K_DEBUGFS \
        ATH11K_DEBUGFS \
+       ATH12K_DEBUGFS \
        CARL9170_DEBUGFS \
        ATH5K_DEBUG \
        ATH6KL_DEBUG \
@@ -31,6 +32,7 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING
   config-y += \
        ATH10K_TRACING \
        ATH11K_TRACING \
+       ATH12K_TRACING \
        ATH6KL_TRACING \
        ATH_TRACEPOINTS \
        ATH5K_TRACER \
@@ -39,7 +41,7 @@ endif
 
 config-$(call config_package,qcom-qmi-helpers) += QCOM_QMI_HELPERS
 config-$(call config_package,ath,regular smallbuffers) += ATH_CARDS ATH_COMMON
-config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH9K_STATION_STATISTICS
+config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH12K_DEBUG ATH9K_STATION_STATISTICS
 config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
 config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL ATH11K_SPECTRAL
 config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
@@ -64,6 +66,7 @@ config-$(call config_package,ath10k-smallbuffers,smallbuffers) += ATH10K ATH10K_
 config-$(call config_package,ath11k) += ATH11K
 config-$(call config_package,ath11k-ahb) += ATH11K_AHB
 config-$(call config_package,ath11k-pci) += ATH11K_PCI
+config-$(call config_package,ath12k) += ATH12K
 
 config-$(call config_package,ath5k) += ATH5K ATH5K_PCI
 
@@ -353,6 +356,22 @@ This module adds support for Qualcomm Technologies 802.11ax family of
 chipsets with PCI bus.
 endef
 
+define KernelPackage/ath12k
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=Qualcomm 802.11be wireless chipset support
+  URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath12k
+  DEPENDS+= +kmod-ath +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT \
+  +kmod-crypto-michael-mic +kmod-qrtr-mhi \
+  +kmod-qcom-qmi-helpers
+  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath12k/ath12k.ko
+  AUTOLOAD:=$(call AutoProbe,ath12k)
+endef
+
+define KernelPackage/ath12k/description
+This module adds support for Qualcomm Technologies 802.11be family of
+chipsets with PCI bus.
+endef
+
 define KernelPackage/carl9170
   $(call KernelPackage/mac80211/Default)
   TITLE:=Driver for Atheros AR9170 USB sticks