From d33033f7d0ae5efecc19e07949cb0db0f0f4aea4 Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Mon, 11 Jun 2018 10:58:30 -0700 Subject: [PATCH] qcacld-3.0: Kbuild changes for TWT Add the compilation flags for TWT feature to Kbuild. Based on the compilation flag, include the source files for compilation and also include the header files path. Change-Id: I45991b3c9e49e2aa0ff51a2650fde69ea447bf15 CRs-Fixed: 2238302 --- Kbuild | 14 +++++++++++++- configs/default_defconfig | 1 + core/hdd/inc/wlan_hdd_cfg.h | 6 +++--- core/hdd/inc/wlan_hdd_main.h | 2 +- core/hdd/inc/wlan_hdd_twt.h | 2 +- core/hdd/src/wlan_hdd_cfg.c | 2 +- core/sme/inc/sme_api.h | 2 +- core/sme/src/common/sme_api.c | 2 +- core/wma/inc/wma_twt.h | 4 ++-- core/wma/src/wma_main.c | 2 +- 10 files changed, 25 insertions(+), 12 deletions(-) diff --git a/Kbuild b/Kbuild index d617245c57f9..f7047e1d6981 100644 --- a/Kbuild +++ b/Kbuild @@ -145,6 +145,10 @@ ifeq ($(CONFIG_WLAN_FEATURE_11AX), y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_he.o endif +ifeq ($(CONFIG_WLAN_FEATURE_TWT), y) +HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_twt.o +endif + ifeq ($(CONFIG_LITHIUM), y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_rx_monitor.o endif @@ -853,6 +857,11 @@ ifeq ($(CONFIG_WLAN_DFS_MASTER_ENABLE), y) WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_dfs_api.o endif +ifeq ($(CONFIG_WLAN_FEATURE_TWT), y) +WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_twt_api.o +WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_twt_tlv.o +endif + ifeq ($(CONFIG_FEATURE_WLAN_EXTSCAN), y) WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_extscan_api.o WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_extscan_tlv.o @@ -1277,7 +1286,9 @@ endif ifeq ($(CONFIG_WLAN_FEATURE_11AX), y) WMA_OBJS+= $(WMA_SRC_DIR)/wma_he.o endif - +ifeq ($(CONFIG_WLAN_FEATURE_TWT), y) +WMA_OBJS += $(WMA_SRC_DIR)/wma_twt.o +endif ############## PLD ########## PLD_DIR := core/pld PLD_INC_DIR := $(PLD_DIR)/inc @@ -1527,6 +1538,7 @@ cppflags-$(CONFIG_CONVERGED_TDLS_ENABLE) += -DCONVERGED_TDLS_ENABLE cppflags-$(CONFIG_WLAN_CONV_SPECTRAL_ENABLE) += -DWLAN_CONV_SPECTRAL_ENABLE cppflags-$(CONFIG_WMI_CMD_STRINGS) += -DWMI_CMD_STRINGS cppflags-$(CONFIG_FEATURE_MONITOR_MODE_SUPPORT) += -DFEATURE_MONITOR_MODE_SUPPORT +cppflags-$(CONFIG_WLAN_FEATURE_TWT) += -DWLAN_SUPPORT_TWT cppflags-$(CONFIG_WLAN_DISABLE_EXPORT_SYMBOL) += -DWLAN_DISABLE_EXPORT_SYMBOL cppflags-$(CONFIG_WIFI_POS_CONVERGED) += -DWIFI_POS_CONVERGED diff --git a/configs/default_defconfig b/configs/default_defconfig index d54a30cc3a78..2b723d9adc7c 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -520,6 +520,7 @@ CONFIG_WLAN_CONV_SPECTRAL_ENABLE := y CONFIG_WLAN_SPECTRAL_ENABLE := y CONFIG_WMI_CMD_STRINGS := y CONFIG_FEATURE_MONITOR_MODE_SUPPORT := y +CONFIG_WLAN_FEATURE_TWT := y ifeq ($(CONFIG_HELIUMPLUS), y) ifneq ($(CONFIG_FORCE_ALLOC_FROM_DMA_ZONE), y) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index c9ab6c29bfd6..b6e2dac391e8 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -11426,7 +11426,7 @@ enum hdd_wext_control { #define CFG_HE_STA_OBSSPD_DEFAULT (0x15b8c2ae) #endif /* WLAN_FEATURE_11AX */ -#ifdef WLAN_FEATURE_TWT +#ifdef WLAN_SUPPORT_TWT /* * * enable_twt - Enable Target Wake Time support. @@ -11473,7 +11473,7 @@ enum hdd_wext_control { #define CFG_TWT_CONGESTION_TIMEOUT_MAX (10000) #define CFG_TWT_CONGESTION_TIMEOUT_DEFAULT (100) -#endif /* WLAN_FEATURE_TWT */ +#endif /* WLAN_SUPPORT_TWT */ /* * @@ -15013,7 +15013,7 @@ struct hdd_config { bool enable_ul_ofdma; uint32_t he_sta_obsspd; #endif -#ifdef WLAN_FEATURE_TWT +#ifdef WLAN_SUPPORT_TWT bool enable_twt; uint32_t twt_congestion_timeout; #endif diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index fc82548811db..9abbae5fdc21 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1909,7 +1909,7 @@ struct hdd_context { /* defining the board related information */ uint32_t hw_bd_id; struct board_info hw_bd_info; -#ifdef WLAN_FEATURE_TWT +#ifdef WLAN_SUPPORT_TWT enum twt_status twt_state; #endif }; diff --git a/core/hdd/inc/wlan_hdd_twt.h b/core/hdd/inc/wlan_hdd_twt.h index 728b7e436cbb..98d67b4a1b9d 100644 --- a/core/hdd/inc/wlan_hdd_twt.h +++ b/core/hdd/inc/wlan_hdd_twt.h @@ -33,7 +33,7 @@ struct hdd_context; struct wma_tgt_cfg; struct wmi_twt_enable_complete_event_param; -#ifdef WLAN_FEATURE_TWT +#ifdef WLAN_SUPPORT_TWT /** * enum twt_status - TWT target state * @TWT_INIT: Init State diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index a37c8ab31294..68e44429f859 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -4454,7 +4454,7 @@ struct reg_table_entry g_registry_table[] = { CFG_HE_STA_OBSSPD_MIN, CFG_HE_STA_OBSSPD_MAX), #endif -#ifdef WLAN_FEATURE_TWT +#ifdef WLAN_SUPPORT_TWT REG_VARIABLE(CFG_ENABLE_TWT_NAME, WLAN_PARAM_Integer, struct hdd_config, enable_twt, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index 6117fda894e8..421f9cb1f7fd 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -2336,7 +2336,7 @@ void sme_set_amsdu(tHalHandle hal, bool enable); uint8_t sme_get_mcs_idx(uint16_t max_rate, uint8_t rate_flags, uint8_t nss, uint8_t *mcs_rate_flags); -#ifdef WLAN_FEATURE_TWT +#ifdef WLAN_SUPPORT_TWT /** * sme_register_twt_enable_complete_cb() - TWT enable registrar * @hal: HAL handle diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 75ec3556f8c9..d28e56af12ac 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -15536,7 +15536,7 @@ QDF_STATUS sme_deregister_tx_queue_cb(tHalHandle hal) return sme_register_tx_queue_cb(hal, NULL); } -#ifdef WLAN_FEATURE_TWT +#ifdef WLAN_SUPPORT_TWT QDF_STATUS sme_register_twt_enable_complete_cb(tHalHandle hal, void (*twt_enable_cb)(void *hdd_ctx, struct wmi_twt_enable_complete_event_param *params)) diff --git a/core/wma/inc/wma_twt.h b/core/wma/inc/wma_twt.h index 1be154b334fd..0f5d6a825684 100644 --- a/core/wma/inc/wma_twt.h +++ b/core/wma/inc/wma_twt.h @@ -21,7 +21,7 @@ #include "wma.h" -#ifdef WLAN_FEATURE_TWT +#ifdef WLAN_SUPPORT_TWT /** * wma_send_twt_enable_cmd() - Send TWT Enable command to firmware * @pdev_id: pdev id @@ -34,7 +34,7 @@ void wma_send_twt_enable_cmd(uint32_t pdev_id, uint32_t congestion_timeout); static inline void wma_send_twt_enable_cmd(uint32_t pdev_id, uint32_t congestion_timeout) { - WMA_LOGD(FL("TWT not supported as WLAN_FEATURE_TWT is disabled")); + WMA_LOGD(FL("TWT not supported as WLAN_SUPPORT_TWT is disabled")); } #endif diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 7543038a47bb..0ebb7cb1e3d1 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -3564,7 +3564,7 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, wma_vdev_bss_color_collision_info_handler, WMA_RX_WORK_CTX); -#ifdef WLAN_FEATURE_TWT +#ifdef WLAN_SUPPORT_TWT wmi_unified_register_event_handler(wma_handle->wmi_handle, wmi_twt_enable_complete_event_id, wma_twt_en_complete_event_handler,