diff --git a/Kbuild b/Kbuild index a8e5d6e328f5..a9ca6839a46f 100644 --- a/Kbuild +++ b/Kbuild @@ -477,6 +477,9 @@ CONFIG_TRACE_RECORD_FEATURE := y #Flag to enable p2p debug feature CONFIG_WLAN_FEATURE_P2P_DEBUG := y +#Flag to enable DFS Master feature +CONFIG_WLAN_DFS_MASTER_ENABLE := y + #Flag to enable nud tracking feature CONFIG_WLAN_NUD_TRACKING := y @@ -1350,8 +1353,7 @@ WMI_OBJS := $(WMI_OBJ_DIR)/wmi_unified.o \ $(WMI_OBJ_DIR)/wmi_unified_tlv.o \ $(WMI_OBJ_DIR)/wmi_unified_api.o \ $(WMI_OBJ_DIR)/wmi_unified_pmo_api.o \ - $(WMI_OBJ_DIR)/wmi_unified_reg_api.o \ - $(WMI_OBJ_DIR)/wmi_unified_dfs_api.o + $(WMI_OBJ_DIR)/wmi_unified_reg_api.o ifeq ($(CONFIG_WLAN_FEATURE_DSRC), y) ifeq ($(CONFIG_OCB_UT_FRAMEWORK), y) @@ -1359,6 +1361,10 @@ WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_ocb_ut.o endif endif +ifeq ($(CONFIG_WLAN_DFS_MASTER_ENABLE), y) +WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_dfs_api.o +endif + ########### FWLOG ########### FWLOG_DIR := $(WLAN_COMMON_ROOT)/utils/fwlog @@ -1886,7 +1892,6 @@ OBJS := $(HDD_OBJS) \ $(SYS_OBJS) \ $(QDF_OBJS) \ $(CDS_OBJS) \ - $(DFS_OBJS) \ $(FTM_OBJS) OBJS += $(WMA_OBJS) \ @@ -1896,8 +1901,7 @@ OBJS += $(WMA_OBJS) \ $(HTC_OBJS) \ $(INIT_DEINIT_OBJS) \ $(SCHEDULER_OBJS) \ - $(REGULATORY_OBJS) \ - $(DFS_OBJS) + $(REGULATORY_OBJS) OBJS += $(HIF_OBJS) \ $(BMI_OBJS) \ @@ -1915,6 +1919,9 @@ ifeq ($(CONFIG_FEATURE_EPPING), y) OBJS += $(EPPING_OBJS) endif +ifeq ($(CONFIG_WLAN_DFS_MASTER_ENABLE), y) +OBJS += $(DFS_OBJS) +endif OBJS += $(UMAC_OBJMGR_OBJS) OBJS += $(WIFI_POS_OBJS) @@ -2399,15 +2406,15 @@ cppflags-y += -DQCA_HOST2FW_RXBUF_RING #endof dummy flags # DFS component -cppflags-y += -DQCA_MCL_DFS_SUPPORT +cppflags-$(CONFIG_WLAN_DFS_MASTER_ENABLE) += -DQCA_MCL_DFS_SUPPORT ifeq ($(CONFIG_WLAN_FEATURE_DFS_OFFLOAD), y) -cppflags-y += -DWLAN_DFS_FULL_OFFLOAD +cppflags-$(CONFIG_WLAN_DFS_MASTER_ENABLE) += -DWLAN_DFS_FULL_OFFLOAD else -cppflags-y += -DWLAN_DFS_PARTIAL_OFFLOAD +cppflags-$(CONFIG_WLAN_DFS_MASTER_ENABLE) += -DWLAN_DFS_PARTIAL_OFFLOAD endif -cppflags-y += -DDFS_COMPONENT_ENABLE -cppflags-y += -DQCA_DFS_USE_POLICY_MANAGER -cppflags-y += -DQCA_DFS_NOL_PLATFORM_DRV_SUPPORT +cppflags-$(CONFIG_WLAN_DFS_MASTER_ENABLE) += -DDFS_COMPONENT_ENABLE +cppflags-$(CONFIG_WLAN_DFS_MASTER_ENABLE) += -DQCA_DFS_USE_POLICY_MANAGER +cppflags-$(CONFIG_WLAN_DFS_MASTER_ENABLE) += -DQCA_DFS_NOL_PLATFORM_DRV_SUPPORT cppflags-$(CONFIG_WLAN_DEBUGFS) += -DWLAN_DEBUGFS diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 40194996182d..039cecdbf738 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -1323,8 +1323,16 @@ void wlansap_extend_to_acs_range(tHalHandle hal, uint8_t *startChannelNum, * * Return: QDF_STATUS */ +#ifdef DFS_COMPONENT_ENABLE QDF_STATUS wlansap_set_dfs_nol(struct sap_context *sap_ctx, eSapDfsNolType conf); +#else +static inline QDF_STATUS wlansap_set_dfs_nol(struct sap_context *sap_ctx, + eSapDfsNolType conf) +{ + return QDF_STATUS_SUCCESS; +} +#endif /** * wlan_sap_set_vendor_acs() - Set vendor specific acs in sap context diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 0475a637da53..0a9a57a3d2cd 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -213,6 +213,7 @@ static inline void sap_event_init(ptWLAN_SAPEvent sapEvent) sapEvent->u2 = 0; } +#ifdef DFS_COMPONENT_ENABLE /** * sap_random_channel_sel() - This function randomly pick up an available * channel @@ -288,6 +289,12 @@ static uint8_t sap_random_channel_sel(struct sap_context *sap_ctx) sap_ctx->ch_params.center_freq_seg1 = ch_params->center_freq_seg1; return ch; } +#else +static uint8_t sap_random_channel_sel(struct sap_context *sap_ctx) +{ + return 0; +} +#endif /** * sap_is_channel_bonding_etsi_weather_channel() - check weather chan bonding. @@ -3410,6 +3417,7 @@ static QDF_STATUS sap_get_channel_list(struct sap_context *sap_ctx, } #endif +#ifdef DFS_COMPONENT_ENABLE uint8_t sap_indicate_radar(struct sap_context *sap_ctx) { uint8_t target_channel = 0; @@ -3467,6 +3475,7 @@ uint8_t sap_indicate_radar(struct sap_context *sap_ctx) return target_channel; } +#endif /* * CAC timer callback function. diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 59a1fdb54f37..ffd37c57f2f7 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -2352,6 +2352,7 @@ QDF_STATUS wlan_sap_set_vendor_acs(struct sap_context *sap_context, return QDF_STATUS_SUCCESS; } +#ifdef DFS_COMPONENT_ENABLE QDF_STATUS wlansap_set_dfs_nol(struct sap_context *sap_ctx, eSapDfsNolType conf) { @@ -2397,6 +2398,7 @@ QDF_STATUS wlansap_set_dfs_nol(struct sap_context *sap_ctx, return QDF_STATUS_SUCCESS; } +#endif /** * wlansap_populate_del_sta_params() - populate delete station parameter