ath10k-ct: Update to latest CT 4.7 ath10k driver.
[openwrt/openwrt.git] / package / kernel / ath10k-ct / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ath10k-ct
4 PKG_RELEASE=1
5
6 PKG_LICENSE:=GPLv2
7 PKG_LICENSE_FILES:=
8
9 PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
10 PKG_SOURCE_PROTO:=git
11 PKG_SOURCE_DATE:=2017-01-10
12 PKG_SOURCE_VERSION:=f5bacb83baf95e887c50c286606f4f565ef71d86
13 PKG_MIRROR_HASH:=845950a177ed6dd7ad3f645df79403e9980f089a09b66e74a9b88abe58dfe5e6
14
15 PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
16 PKG_BUILD_PARALLEL:=1
17
18 STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
19
20 include $(INCLUDE_DIR)/kernel.mk
21 include $(INCLUDE_DIR)/package.mk
22
23 define KernelPackage/ath10k-ct
24 SUBMENU:=Wireless Drivers
25 TITLE:=ath10k-ct driver optimized for CT ath10k firmware
26 DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +@KERNEL_RELAY
27 FILES:=\
28 $(PKG_BUILD_DIR)/ath10k/ath10k_pci.ko \
29 $(PKG_BUILD_DIR)/ath10k/ath10k_core.ko
30 AUTOLOAD:=$(call AutoLoad,50,mac80211 ath ath10k_core ath10k_pci)
31 endef
32
33 NOSTDINC_FLAGS = \
34 -I$(PKG_BUILD_DIR) \
35 -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
36 -I$(STAGING_DIR)/usr/include/mac80211-backport \
37 -I$(STAGING_DIR)/usr/include/mac80211/uapi \
38 -I$(STAGING_DIR)/usr/include/mac80211 \
39 -include backport/autoconf.h \
40 -include backport/backport.h
41
42 ifdef CONFIG_PACKAGE_MAC80211_MESH
43 NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
44 endif
45
46 CT_MAKEDEFS += CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m
47 # No AHB support enabled yet. Could conditionally enable it later.
48 #CT_MAKEDEFS += CONFIG_ATH10K_AHB=y
49 #NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
50 NOSTDINC_FLAGS += -DSTANDALONE_CT
51
52 ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
53 CT_MAKEDEFS += CONFIG_ATH10K_DEBUGFS=y CONFIG_MAC80211_DEBUGFS=y
54 NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS
55 NOSTDINC_FLAGS += -DCONFIG_ATH10K_DEBUGFS
56 endif
57
58 ifdef CONFIG_PACKAGE_ATH_DEBUG
59 NOSTDINC_FLAGS += -DCONFIG_ATH10K_DEBUG
60 endif
61
62 ifdef CONFIG_PACKAGE_ATH_DFS
63 NOSTDINC_FLAGS += -DCONFIG_ATH10K_DFS_CERTIFIED
64 endif
65
66 define Build/Configure
67 cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
68 endef
69
70 ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
71 CT_MAKEDEFS += V=1
72 endif
73
74 define Build/Compile
75 +$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \
76 ARCH="$(LINUX_KARCH)" \
77 CROSS_COMPILE="$(TARGET_CROSS)" \
78 SUBDIRS="$(PKG_BUILD_DIR)/ath10k" \
79 NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
80 modules
81 endef
82
83 $(eval $(call KernelPackage,ath10k-ct))