qcacld-3.0: add support to remove the ftm from configuration
Phase 1, after ftm componentization, we could now support to remove
the ftm related components when FTM is disable from the build
configuration.
Size changes: after removing the ftm related binaries, we could save
15KB from module size.
Change-Id: Ib363f1d6204b07947a46f32673c4f8ad6fb3dbd3
CRs-fixed: 2258441
diff --git a/Kbuild b/Kbuild
index d5816ee..0b94998 100755
--- a/Kbuild
+++ b/Kbuild
@@ -682,16 +682,22 @@
-I$(OS_IF_FTM_INC) \
-I$(TARGET_IF_FTM_INC)
+ifeq ($(CONFIG_QCA_WIFI_FTM), y)
FTM_OBJS := $(FTM_DISP_SRC)/wlan_ftm_init_deinit.o \
$(FTM_DISP_SRC)/wlan_ftm_ucfg_api.o \
$(FTM_CORE_SRC)/wlan_ftm_svc.o \
- $(OS_IF_FTM_SRC)/wlan_cfg80211_ftm.o \
$(TARGET_IF_FTM_SRC)/target_if_ftm.o
+ifeq ($(QCA_WIFI_FTM_NL80211), y)
+FTM_OBJS += $(OS_IF_FTM_SRC)/wlan_cfg80211_ftm.o
+endif
+
ifeq ($(CONFIG_LINUX_QCMBR), y)
FTM_OBJS += $(OS_IF_FTM_SRC)/wlan_ioctl_ftm.o
endif
+endif
+
############# UMAC_CMN_SERVICES ############
UMAC_COMMON_INC := -I$(WLAN_COMMON_INC)/umac/cmn_services/cmn_defs/inc \
-I$(WLAN_COMMON_INC)/umac/cmn_services/utils/inc
@@ -2031,6 +2037,8 @@
#Enable FTM support
cppflags-$(CONFIG_QCA_WIFI_FTM) += -DQCA_WIFI_FTM
+cppflags-$(CONFIG_NL80211_TESTMODE) += -DQCA_WIFI_FTM_NL80211
+cppflags-$(CONFIG_LINUX_QCMBR) += -DLINUX_QCMBR -DQCA_WIFI_FTM_IOCTL
#Enable Checksum Offload support
cppflags-$(CONFIG_CHECKSUM_OFFLOAD) += -DCHECKSUM_OFFLOAD