1 include $(TOPDIR
)/rules.mk
9 PKG_SOURCE_URL
:=https
://github.com
/greearb
/ath10k-ct.git
11 PKG_SOURCE_DATE
:=2022-05-13
12 PKG_SOURCE_VERSION
:=f808496fcc6b1f68942914117aebf8b3f8d52bb3
13 PKG_MIRROR_HASH
:=39527b3408696594eda5579521a9fb798417be4dda73fa08e8b3a8c7b0d3f3d9
15 # Build the 5.15 ath10k-ct driver version.
16 # Probably this should match as closely as
17 # possible to whatever mac80211 backports version is being used.
20 PKG_MAINTAINER
:=Ben Greear
<greearb@candelatech.com
>
22 PKG_EXTMOD_SUBDIRS
:=ath10k
$(CT_KVER
)
24 STAMP_CONFIGURED_DEPENDS
:= $(STAGING_DIR
)/usr
/include/mac80211-backport
/backport
/autoconf.h
26 include $(INCLUDE_DIR
)/kernel.mk
27 include $(INCLUDE_DIR
)/package.mk
29 define KernelPackage
/ath10k-ct
30 SUBMENU
:=Wireless Drivers
31 TITLE
:=ath10k-ct driver optimized for CT ath10k firmware
32 DEPENDS
:=+kmod-mac80211
+kmod-ath
+@DRIVER_11AC_SUPPORT @PCI_SUPPORT
+kmod-hwmon-core
34 $(PKG_BUILD_DIR
)/ath10k
$(CT_KVER
)/ath10k_pci.ko \
35 $(PKG_BUILD_DIR
)/ath10k
$(CT_KVER
)/ath10k_core.ko
36 AUTOLOAD
:=$(call AutoProbe
,ath10k_pci
)
41 define KernelPackage
/ath10k-ct
/config
44 bool
"Enable LED support"
46 depends on PACKAGE_kmod-ath10k-ct || PACKAGE_kmod-ath10k-ct-smallbuffers
49 define KernelPackage
/ath10k-ct-smallbuffers
50 $(call KernelPackage
/ath10k-ct
)
51 TITLE
+= (small buffers for low-RAM devices
)
56 $(KERNEL_NOSTDINC_FLAGS
) \
58 -I
$(STAGING_DIR
)/usr
/include/mac80211-backport
/uapi \
59 -I
$(STAGING_DIR
)/usr
/include/mac80211-backport \
60 -I
$(STAGING_DIR
)/usr
/include/mac80211
/uapi \
61 -I
$(STAGING_DIR
)/usr
/include/mac80211 \
62 -include backport
/autoconf.h \
63 -include backport
/backport.h
65 ifdef CONFIG_PACKAGE_MAC80211_MESH
66 NOSTDINC_FLAGS
+= -DCONFIG_MAC80211_MESH
69 CT_MAKEDEFS
+= CONFIG_ATH10K
=m CONFIG_ATH10K_PCI
=m CONFIG_ATH10K_CE
=y
71 # This AHB logic is needed for IPQ4019 radios
72 CT_MAKEDEFS
+= CONFIG_ATH10K_AHB
=m
73 NOSTDINC_FLAGS
+= -DCONFIG_ATH10K_AHB
75 NOSTDINC_FLAGS
+= -DSTANDALONE_CT
77 ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
78 CT_MAKEDEFS
+= CONFIG_ATH10K_DEBUGFS
=y CONFIG_MAC80211_DEBUGFS
=y
79 NOSTDINC_FLAGS
+= -DCONFIG_MAC80211_DEBUGFS
80 NOSTDINC_FLAGS
+= -DCONFIG_ATH10K_DEBUGFS
83 ifdef CONFIG_PACKAGE_ATH_DEBUG
84 NOSTDINC_FLAGS
+= -DCONFIG_ATH10K_DEBUG
87 ifdef CONFIG_PACKAGE_ATH_DFS
88 NOSTDINC_FLAGS
+= -DCONFIG_ATH10K_DFS_CERTIFIED
91 ifdef CONFIG_PACKAGE_ATH_SPECTRAL
92 CT_MAKEDEFS
+= CONFIG_ATH10K_SPECTRAL
=y
93 NOSTDINC_FLAGS
+= -DCONFIG_ATH10K_SPECTRAL
96 ifeq ($(CONFIG_ATH10K-CT_LEDS
),y
)
97 CT_MAKEDEFS
+= CONFIG_ATH10K_LEDS
=y
98 NOSTDINC_FLAGS
+= -DCONFIG_ATH10K_LEDS
101 ifeq ($(BUILD_VARIANT
),smallbuffers
)
102 NOSTDINC_FLAGS
+= -DCONFIG_ATH10K_SMALLBUFFERS
105 define Build
/Configure
106 cp
$(STAGING_DIR
)/usr
/include/mac80211
/ath
/*.h
$(PKG_BUILD_DIR
)
109 ifneq ($(findstring c
,$(OPENWRT_VERBOSE
)),)
114 +$(KERNEL_MAKE
) $(CT_MAKEDEFS
) $(PKG_JOBS
) \
115 M
="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \
116 NOSTDINC_FLAGS
="$(NOSTDINC_FLAGS)" \
120 $(eval
$(call KernelPackage
,ath10k-ct
))
121 $(eval
$(call KernelPackage
,ath10k-ct-smallbuffers
))