From 2fb1fdb1ac8a0678088a1166fdec06f8fa1025fb Mon Sep 17 00:00:00 2001 From: Nachiket Kukade Date: Tue, 8 Jan 2019 15:35:27 +0530 Subject: [PATCH] qcacld-3.0: Combine all NAN related flags with WLAN_FEATURE_NAN Flag WLAN_FEATURE_NAN_DATAPATH was added to protect NAN Datapath related code, while WLAN_FEATURE_NAN_CONVERGENCE was added to protect the converged code inside NAN Component. Since the original NAN Discovery related code has now been moved inside NAN component and NAN Datapath cannot exist without NAN Discovery, keeping these flags separate doesn't make sense. Combine these two flags with WLAN_FEATURE_NAN flag which is the original NAN feature flag. As a cleanup of NAN code, combine all NAN related flags with WLAN_FEATURE_NAN flag. Change-Id: If98ecaace17f8724e9c28325ef61e721f42e1d8f CRs-Fixed: 2377375 --- Kbuild | 19 ++++++------------- Kconfig | 5 ----- components/cfg/cfg_all.h | 4 ++-- components/nan/core/inc/wlan_nan_api.h | 8 ++++---- components/nan/core/src/nan_api.c | 16 +++++++--------- components/nan/core/src/nan_main_i.h | 10 +++------- components/nan/dispatcher/inc/cfg_nan.h | 8 ++------ components/nan/dispatcher/inc/cfg_nan_api.h | 15 +++++++-------- configs/default_defconfig | 6 ------ configs/genoa.common | 2 -- core/hdd/inc/wlan_hdd_main.h | 5 ++--- core/hdd/src/wlan_hdd_main.c | 2 +- core/hdd/src/wlan_hdd_nan_datapath.h | 14 ++++++-------- core/mac/inc/sir_api.h | 6 ++---- core/mac/src/pe/lim/lim_api.c | 2 +- core/mac/src/pe/nan/nan_datapath.h | 4 ++-- core/sme/inc/csr_api.h | 6 +++--- core/sme/inc/sme_nan_datapath.h | 8 ++++---- core/wma/inc/wma_tgt_cfg.h | 2 +- core/wma/src/wma_nan_datapath.h | 8 ++++---- os_if/nan/inc/os_if_nan.h | 6 +++--- 21 files changed, 60 insertions(+), 96 deletions(-) diff --git a/Kbuild b/Kbuild index e74d20b78dca..b81b5bf508a0 100644 --- a/Kbuild +++ b/Kbuild @@ -131,6 +131,7 @@ endif ifeq ($(CONFIG_QCACLD_FEATURE_NAN), y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_nan.o +HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_nan_datapath.o endif ifeq ($(CONFIG_QCOM_TDLS), y) @@ -157,10 +158,6 @@ ifeq ($(CONFIG_LFR_SUBNET_DETECTION), y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_subnet_detect.o endif -ifeq ($(CONFIG_WLAN_FEATURE_NAN_DATAPATH), y) -HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_nan_datapath.o -endif - ifeq ($(CONFIG_WLAN_FEATURE_11AX), y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_he.o endif @@ -334,7 +331,7 @@ ifeq ($(CONFIG_WLAN_FEATURE_FILS), y) MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/lim_process_fils.o endif -ifeq ($(CONFIG_WLAN_FEATURE_NAN_DATAPATH), y) +ifeq ($(CONFIG_QCACLD_FEATURE_NAN), y) MAC_NDP_OBJS += $(MAC_SRC_DIR)/pe/nan/nan_datapath.o endif @@ -460,7 +457,7 @@ SME_CMN_OBJS := $(SME_SRC_DIR)/common/sme_api.o \ SME_RRM_OBJS := $(SME_SRC_DIR)/rrm/sme_rrm.o -ifeq ($(CONFIG_WLAN_FEATURE_NAN_DATAPATH), y) +ifeq ($(CONFIG_QCACLD_FEATURE_NAN), y) SME_NDP_OBJS += $(SME_SRC_DIR)/nan/nan_datapath_api.o endif @@ -1117,7 +1114,7 @@ WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_extscan_api.o WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_extscan_tlv.o endif -ifeq ($(CONFIG_NAN_CONVERGENCE), y) +ifeq ($(CONFIG_QCACLD_FEATURE_NAN), y) WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_nan_api.o WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_nan_tlv.o endif @@ -1409,7 +1406,7 @@ NAN_TGT_INC := -I$(WLAN_ROOT)/components/target_if/nan/inc NAN_OS_IF_DIR := os_if/nan/src NAN_OS_IF_INC := -I$(WLAN_ROOT)/os_if/nan/inc -ifeq ($(CONFIG_NAN_CONVERGENCE), y) +ifeq ($(CONFIG_QCACLD_FEATURE_NAN), y) WLAN_NAN_OBJS := $(NAN_CORE_DIR)/nan_main.o \ $(NAN_CORE_DIR)/nan_api.o \ $(NAN_UCFG_DIR)/nan_ucfg_api.o \ @@ -1604,7 +1601,7 @@ WMA_SRC_DIR := $(WMA_DIR)/src WMA_INC := -I$(WLAN_ROOT)/$(WMA_INC_DIR) \ -I$(WLAN_ROOT)/$(WMA_SRC_DIR) -ifeq ($(CONFIG_WLAN_FEATURE_NAN_DATAPATH), y) +ifeq ($(CONFIG_QCACLD_FEATURE_NAN), y) WMA_NDP_OBJS += $(WMA_SRC_DIR)/wma_nan_datapath.o endif @@ -2358,10 +2355,6 @@ cppflags-$(CONFIG_LFR_SUBNET_DETECTION) += -DFEATURE_LFR_SUBNET_DETECTION cppflags-$(CONFIG_MCC_TO_SCC_SWITCH) += -DFEATURE_WLAN_MCC_TO_SCC_SWITCH -cppflags-$(CONFIG_WLAN_FEATURE_NAN_DATAPATH) += -DWLAN_FEATURE_NAN_DATAPATH - -cppflags-$(CONFIG_NAN_CONVERGENCE) += -DWLAN_FEATURE_NAN_CONVERGENCE - cppflags-$(CONFIG_FEATURE_WLAN_D0WOW) += -DFEATURE_WLAN_D0WOW cppflags-$(CONFIG_QCA_WIFI_NAPIER_EMULATION) += -DQCA_WIFI_NAPIER_EMULATION diff --git a/Kconfig b/Kconfig index bb65a842cdc8..02ad2388209e 100644 --- a/Kconfig +++ b/Kconfig @@ -33,11 +33,6 @@ config QCACLD_FEATURE_NAN bool "Enable NAN feature" default n -config WLAN_FEATURE_NAN_DATAPATH - bool "Enable NaN Data Path feature" - depends on QCACLD_FEATURE_NAN - default n - config QCACLD_FEATURE_GREEN_AP bool "Enable Green AP feature" default n diff --git a/components/cfg/cfg_all.h b/components/cfg/cfg_all.h index 6b0ddfa245f9..8d93faa92f7a 100644 --- a/components/cfg/cfg_all.h +++ b/components/cfg/cfg_all.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -35,7 +35,7 @@ #define CFG_TDLS_ALL #endif -#ifdef WLAN_FEATURE_NAN_CONVERGENCE +#ifdef WLAN_FEATURE_NAN #include "cfg_nan.h" #else #define CFG_NAN_ALL diff --git a/components/nan/core/inc/wlan_nan_api.h b/components/nan/core/inc/wlan_nan_api.h index a39369935377..1e59efab7953 100644 --- a/components/nan/core/inc/wlan_nan_api.h +++ b/components/nan/core/inc/wlan_nan_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -28,7 +28,7 @@ #include "wlan_policy_mgr_public_struct.h" #include "qdf_status.h" -#ifdef WLAN_FEATURE_NAN_CONVERGENCE +#ifdef WLAN_FEATURE_NAN #include "../src/nan_main_i.h" @@ -164,7 +164,7 @@ struct wlan_nan_rx_ops *nan_psoc_get_rx_ops(struct wlan_objmgr_psoc *psoc) QDF_STATUS wlan_nan_get_connection_info(struct wlan_objmgr_psoc *psoc, struct policy_mgr_vdev_entry_info *conn_info); -#else /* WLAN_FEATURE_NAN_CONVERGENCE */ +#else /* WLAN_FEATURE_NAN */ static inline QDF_STATUS nan_init(void) { return QDF_STATUS_SUCCESS; @@ -191,5 +191,5 @@ wlan_nan_get_connection_info(struct wlan_objmgr_psoc *psoc, { return QDF_STATUS_SUCCESS; } -#endif /* WLAN_FEATURE_NAN_CONVERGENCE */ +#endif /* WLAN_FEATURE_NAN */ #endif /* _WLAN_NAN_API_H_ */ diff --git a/components/nan/core/src/nan_api.c b/components/nan/core/src/nan_api.c index ecad74af553c..757ff983cdd5 100644 --- a/components/nan/core/src/nan_api.c +++ b/components/nan/core/src/nan_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -32,6 +32,7 @@ #include "cfg_nan.h" #include "cfg_ucfg_api.h" +#ifdef WLAN_FEATURE_NAN /** * nan_cfg_init() - Initialize NAN config params * @psoc: Pointer to PSOC Object @@ -39,7 +40,6 @@ * * This function initialize NAN config params */ -#ifdef WLAN_FEATURE_NAN static void nan_cfg_init(struct wlan_objmgr_psoc *psoc, struct nan_psoc_priv_obj *nan_obj) { @@ -48,12 +48,6 @@ static void nan_cfg_init(struct wlan_objmgr_psoc *psoc, nan_obj->cfg_param.enable = cfg_get(psoc, CFG_NAN_ENABLE); } -#else -static void nan_cfg_init(struct wlan_objmgr_psoc *psoc, - struct nan_psoc_priv_obj *nan_obj) -{ -} -#endif /** * nan_cfg_dp_init() - Initialize NAN Datapath config params @@ -62,7 +56,6 @@ static void nan_cfg_init(struct wlan_objmgr_psoc *psoc, * * This function initialize NAN config params */ -#ifdef WLAN_FEATURE_NAN_DATAPATH static void nan_cfg_dp_init(struct wlan_objmgr_psoc *psoc, struct nan_psoc_priv_obj *nan_obj) { @@ -74,6 +67,11 @@ static void nan_cfg_dp_init(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_NAN_RANDOMIZE_NDI_MAC); } #else +static void nan_cfg_init(struct wlan_objmgr_psoc *psoc, + struct nan_psoc_priv_obj *nan_obj) +{ +} + static void nan_cfg_dp_init(struct wlan_objmgr_psoc *psoc, struct nan_psoc_priv_obj *nan_obj) { diff --git a/components/nan/core/src/nan_main_i.h b/components/nan/core/src/nan_main_i.h index 91b7284070fb..2f29d1782447 100644 --- a/components/nan/core/src/nan_main_i.h +++ b/components/nan/core/src/nan_main_i.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -21,7 +21,7 @@ * used in NAN modules */ -#ifdef WLAN_FEATURE_NAN_CONVERGENCE +#ifdef WLAN_FEATURE_NAN #ifndef _WLAN_NAN_MAIN_I_H_ #define _WLAN_NAN_MAIN_I_H_ @@ -83,13 +83,9 @@ enum nan_disc_state { * @ndi_mac_randomize: Randomize NAN datapath interface MAC */ struct nan_cfg_params { -#ifdef WLAN_FEATURE_NAN bool enable; -#endif -#ifdef WLAN_FEATURE_NAN_DATAPATH bool dp_enable; bool ndi_mac_randomize; -#endif }; /** @@ -245,4 +241,4 @@ nan_get_connection_info(struct wlan_objmgr_psoc *psoc, uint8_t *chan, uint8_t *mac_id); #endif /* _WLAN_NAN_MAIN_I_H_ */ -#endif /* WLAN_FEATURE_NAN_CONVERGENCE */ +#endif /* WLAN_FEATURE_NAN */ diff --git a/components/nan/dispatcher/inc/cfg_nan.h b/components/nan/dispatcher/inc/cfg_nan.h index 41cf95273c78..4a45c4271eb1 100644 --- a/components/nan/dispatcher/inc/cfg_nan.h +++ b/components/nan/dispatcher/inc/cfg_nan.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -95,14 +95,10 @@ #ifdef WLAN_FEATURE_NAN #define CFG_NAN_DISC CFG(CFG_NAN_ENABLE) -#else -#define CFG_NAN_DISC -#endif - -#ifdef WLAN_FEATURE_NAN_DATAPATH #define CFG_NAN_DP CFG(CFG_NAN_DATAPATH_ENABLE) \ CFG(CFG_NAN_RANDOMIZE_NDI_MAC) #else +#define CFG_NAN_DISC #define CFG_NAN_DP #endif diff --git a/components/nan/dispatcher/inc/cfg_nan_api.h b/components/nan/dispatcher/inc/cfg_nan_api.h index f2f1580ae4a2..5561907acaff 100644 --- a/components/nan/dispatcher/inc/cfg_nan_api.h +++ b/components/nan/dispatcher/inc/cfg_nan_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -37,14 +37,7 @@ struct wlan_objmgr_psoc; * This function returns NAN enable status */ bool cfg_nan_get_enable(struct wlan_objmgr_psoc *psoc); -#else -static inline bool cfg_nan_get_enable(struct wlan_objmgr_psoc *psoc) -{ - return false; -} -#endif -#ifdef WLAN_FEATURE_NAN_DATAPATH /** * cfg_nan_get_datapath_enable() - get NAN Datapath support enable status * @psoc: pointer to psoc object @@ -61,6 +54,11 @@ bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc); */ bool cfg_nan_get_ndi_mac_randomize(struct wlan_objmgr_psoc *psoc); #else +static inline bool cfg_nan_get_enable(struct wlan_objmgr_psoc *psoc) +{ + return false; +} + static inline bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc) { return false; @@ -71,5 +69,6 @@ static inline bool cfg_nan_get_ndi_mac_randomize(struct wlan_objmgr_psoc *psoc) return false; } #endif + #endif diff --git a/configs/default_defconfig b/configs/default_defconfig index 1c01c1334d51..c8bb8a54f2c8 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -183,12 +183,6 @@ ifneq ($(CONFIG_MOBILE_ROUTER), y) CONFIG_QCACLD_FEATURE_NAN := y endif -ifneq ($(CONFIG_MOBILE_ROUTER), y) - #Flag to enable NAN Data path - CONFIG_WLAN_FEATURE_NAN_DATAPATH := y - CONFIG_NAN_CONVERGENCE := y -endif - #Flag to enable Linux QCMBR feature as default feature ifeq ($(CONFIG_ROME_IF),usb) CONFIG_LINUX_QCMBR :=y diff --git a/configs/genoa.common b/configs/genoa.common index 0b9bc7281407..66c2442d3b28 100644 --- a/configs/genoa.common +++ b/configs/genoa.common @@ -20,8 +20,6 @@ CONFIG_WLAN_FEATURE_11W := y CONFIG_QCOM_LTE_COEX := n CONFIG_WLAN_FEATURE_LPSS := n CONFIG_QCACLD_FEATURE_NAN := y -CONFIG_WLAN_FEATURE_NAN_DATAPATH := y -CONFIG_NAN_CONVERGENCE := y CONFIG_POWER_MANAGEMENT_OFFLOAD := y CONFIG_LFR_SUBNET_DETECTION := y CONFIG_MCC_TO_SCC_SWITCH := y diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 7ced6de6a736..ef70d1c88ad4 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -723,7 +723,6 @@ struct hdd_mon_set_ch_info { * @sta_debug_state: STA context debug variable * @broadcast_staid: STA ID assigned for broadcast frames * @ch_info: monitor mode channel information - * @ndp_ctx: NAN data path context * @ap_supports_immediate_power_save: Does the current AP allow our STA * to immediately go into power save? */ @@ -1367,7 +1366,7 @@ struct hdd_adapter { (&(adapter)->session.ap.hostapd_state) #define WLAN_HDD_GET_SAP_CTX_PTR(adapter) ((adapter)->session.ap.sap_context) -#ifdef WLAN_FEATURE_NAN_DATAPATH +#ifdef WLAN_FEATURE_NAN #define WLAN_HDD_IS_NDP_ENABLED(hdd_ctx) ((hdd_ctx)->nan_datapath_enabled) #else /* WLAN_HDD_GET_NDP_CTX_PTR and WLAN_HDD_GET_NDP_WEXT_STATE_PTR are not defined @@ -1799,7 +1798,7 @@ struct hdd_context { qdf_work_t sap_pre_cac_work; bool hbw_requested; enum RX_OFFLOAD ol_enable; -#ifdef WLAN_FEATURE_NAN_DATAPATH +#ifdef WLAN_FEATURE_NAN bool nan_datapath_enabled; #endif /* Present state of driver cds modules */ diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 768ed2f94423..cd5de4ff9889 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2694,7 +2694,7 @@ static void hdd_register_policy_manager_callback( } #endif -#ifdef WLAN_FEATURE_NAN_DATAPATH +#ifdef WLAN_FEATURE_NAN static void hdd_nan_register_callbacks(struct hdd_context *hdd_ctx) { struct nan_callbacks cb_obj = {0}; diff --git a/core/hdd/src/wlan_hdd_nan_datapath.h b/core/hdd/src/wlan_hdd_nan_datapath.h index 1320095cd12d..c1dbe9b10364 100644 --- a/core/hdd/src/wlan_hdd_nan_datapath.h +++ b/core/hdd/src/wlan_hdd_nan_datapath.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -36,18 +36,13 @@ struct wireless_dev; #define NDP_BROADCAST_STAID (0) -#ifdef WLAN_FEATURE_NAN_DATAPATH +#ifdef WLAN_FEATURE_NAN #define WLAN_HDD_IS_NDI(adapter) ((adapter)->device_mode == QDF_NDI_MODE) #define WLAN_HDD_IS_NDI_CONNECTED(adapter) ( \ eConnectionState_NdiConnected ==\ (adapter)->session.station.conn_info.connState) -#else -#define WLAN_HDD_IS_NDI(adapter) (false) -#define WLAN_HDD_IS_NDI_CONNECTED(adapter) (false) -#endif /* WLAN_FEATURE_NAN_DATAPATH */ -#ifdef WLAN_FEATURE_NAN_DATAPATH void hdd_nan_datapath_target_config(struct hdd_context *hdd_ctx, struct wma_tgt_cfg *cfg); void hdd_ndp_event_handler(struct hdd_adapter *adapter, @@ -59,6 +54,9 @@ int wlan_hdd_cfg80211_process_ndp_cmd(struct wiphy *wiphy, int hdd_init_nan_data_mode(struct hdd_adapter *adapter); void hdd_ndp_session_end_handler(struct hdd_adapter *adapter); #else +#define WLAN_HDD_IS_NDI(adapter) (false) +#define WLAN_HDD_IS_NDI_CONNECTED(adapter) (false) + static inline void hdd_nan_datapath_target_config(struct hdd_context *hdd_ctx, struct wma_tgt_cfg *cfg) { @@ -82,7 +80,7 @@ static inline int hdd_init_nan_data_mode(struct hdd_adapter *adapter) static inline void hdd_ndp_session_end_handler(struct hdd_adapter *adapter) { } -#endif /* WLAN_FEATURE_NAN_DATAPATH */ +#endif /* WLAN_FEATURE_NAN */ enum nan_datapath_state; struct nan_datapath_inf_create_rsp; diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 61bca2609eb8..6f3318b3ce35 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -4986,8 +4986,7 @@ struct sir_vdev_wow_stats { }; #endif -#ifdef WLAN_FEATURE_NAN_DATAPATH - +#ifdef WLAN_FEATURE_NAN #define IFACE_NAME_SIZE 64 /** @@ -5434,8 +5433,7 @@ struct sme_ndp_peer_ind { struct qdf_mac_addr peer_mac_addr; uint16_t sta_id; }; - -#endif /* WLAN_FEATURE_NAN_DATAPATH */ +#endif /* WLAN_FEATURE_NAN */ /** * struct sir_set_tx_rx_aggregation_size - sets tx rx aggregation size diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index c0299478af9f..42547fd8ed83 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -563,7 +563,7 @@ static void lim_register_debug_callback(void) } #endif /* WLAN_FEATURE_MEMDUMP_ENABLE */ -#ifdef WLAN_FEATURE_NAN_CONVERGENCE +#ifdef WLAN_FEATURE_NAN static void lim_nan_register_callbacks(struct mac_context *mac_ctx) { struct nan_callbacks cb_obj = {0}; diff --git a/core/mac/src/pe/nan/nan_datapath.h b/core/mac/src/pe/nan/nan_datapath.h index c8490564fd56..fbd130050dbc 100644 --- a/core/mac/src/pe/nan/nan_datapath.h +++ b/core/mac/src/pe/nan/nan_datapath.h @@ -25,7 +25,7 @@ #ifndef __MAC_NAN_DATAPATH_H #define __MAC_NAN_DATAPATH_H -#if defined(WLAN_FEATURE_NAN_DATAPATH) || defined(WLAN_FEATURE_NAN_CONVERGENCE) +#ifdef WLAN_FEATURE_NAN #include "sir_common.h" #include "ani_global.h" @@ -78,7 +78,7 @@ static inline void lim_ndp_add_sta_rsp(struct mac_context *mac_ctx, { } -#endif /* WLAN_FEATURE_NAN_DATAPATH || WLAN_FEATURE_NAN_CONVERGENCE */ +#endif /* WLAN_FEATURE_NAN */ #endif /* __MAC_NAN_DATAPATH_H */ diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 3ce2fbdc23dd..9079f20bb897 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1140,7 +1140,7 @@ struct csr_roam_info { tSirSmeChanInfo chan_info; uint8_t target_channel; -#ifdef WLAN_FEATURE_NAN_DATAPATH +#ifdef WLAN_FEATURE_NAN union { struct ndi_create_rsp ndi_create_params; struct ndi_delete_rsp ndi_delete_params; @@ -1357,14 +1357,14 @@ typedef QDF_STATUS (*csr_session_close_cb)(uint8_t session_id); (pProfile)->BSSType) #define CSR_IS_INFRA_AP(pProfile) (eCSR_BSS_TYPE_INFRA_AP == \ (pProfile)->BSSType) -#ifdef WLAN_FEATURE_NAN_DATAPATH +#ifdef WLAN_FEATURE_NAN #define CSR_IS_NDI(profile) (eCSR_BSS_TYPE_NDI == (profile)->BSSType) #else #define CSR_IS_NDI(profile) (false) #endif #define CSR_IS_CONN_INFRA_AP(pProfile) (eCSR_BSS_TYPE_INFRA_AP == \ (pProfile)->BSSType) -#ifdef WLAN_FEATURE_NAN_DATAPATH +#ifdef WLAN_FEATURE_NAN #define CSR_IS_CONN_NDI(profile) (eCSR_BSS_TYPE_NDI == (profile)->BSSType) #else #define CSR_IS_CONN_NDI(profile) (false) diff --git a/core/sme/inc/sme_nan_datapath.h b/core/sme/inc/sme_nan_datapath.h index 80fed5a7b822..a12d98af40d1 100644 --- a/core/sme/inc/sme_nan_datapath.h +++ b/core/sme/inc/sme_nan_datapath.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -27,7 +27,7 @@ #include "csr_inside_api.h" -#ifdef WLAN_FEATURE_NAN_DATAPATH +#ifdef WLAN_FEATURE_NAN /* Start NDI BSS */ QDF_STATUS csr_roam_start_ndi(struct mac_context *mac_ctx, uint32_t session_id, struct csr_roam_profile *profile); @@ -43,7 +43,7 @@ void csr_roam_update_ndp_return_params(struct mac_context *mac_ctx, uint32_t *roam_result, struct csr_roam_info *roam_info); -#else +#else /* WLAN_FEATURE_NAN */ /* Start NDI BSS */ static inline QDF_STATUS csr_roam_start_ndi(struct mac_context *mac_ctx, uint32_t session_id, @@ -67,6 +67,6 @@ static inline void csr_roam_update_ndp_return_params(struct mac_context *mac_ctx { } -#endif /* WLAN_FEATURE_NAN_DATAPATH */ +#endif /* WLAN_FEATURE_NAN */ #endif /* __SME_NAN_DATAPATH_H */ diff --git a/core/wma/inc/wma_tgt_cfg.h b/core/wma/inc/wma_tgt_cfg.h index e1319f7d3c93..867c4e2182c7 100644 --- a/core/wma/inc/wma_tgt_cfg.h +++ b/core/wma/inc/wma_tgt_cfg.h @@ -193,7 +193,7 @@ struct wma_tgt_cfg { #ifdef FEATURE_WLAN_RA_FILTERING bool is_ra_rate_limit_enabled; #endif -#ifdef WLAN_FEATURE_NAN_DATAPATH +#ifdef WLAN_FEATURE_NAN bool nan_datapath_enabled; #endif bool sub_20_support; diff --git a/core/wma/src/wma_nan_datapath.h b/core/wma/src/wma_nan_datapath.h index 95394fb09490..c2aa1f395dc9 100644 --- a/core/wma/src/wma_nan_datapath.h +++ b/core/wma/src/wma_nan_datapath.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -42,7 +42,7 @@ static inline uint32_t wma_ndp_get_eventid_from_tlvtag(uint32_t tag) return 0; } -#ifdef WLAN_FEATURE_NAN_DATAPATH +#ifdef WLAN_FEATURE_NAN #define WMA_IS_VDEV_IN_NDI_MODE(intf, vdev_id) \ (WMI_VDEV_TYPE_NDI == intf[vdev_id].type) @@ -83,7 +83,7 @@ static inline bool wma_is_ndi_active(tp_wma_handle wma_handle) } return false; } -#else +#else /* WLAN_FEATURE_NAN */ #define WMA_IS_VDEV_IN_NDI_MODE(intf, vdev_id) (false) static inline void wma_update_hdd_cfg_ndp(tp_wma_handle wma_handle, struct wma_tgt_cfg *tgt_cfg) @@ -105,6 +105,6 @@ static inline void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta) {} static inline bool wma_is_ndi_active(tp_wma_handle wma_handle) { return false; } -#endif /* WLAN_FEATURE_NAN_DATAPATH */ +#endif /* WLAN_FEATURE_NAN */ #endif /* __WMA_NAN_DATAPATH_H */ diff --git a/os_if/nan/inc/os_if_nan.h b/os_if/nan/inc/os_if_nan.h index 2845186877d2..65ac9c2331ed 100644 --- a/os_if/nan/inc/os_if_nan.h +++ b/os_if/nan/inc/os_if_nan.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -24,7 +24,7 @@ #define _OS_IF_NAN_H_ #include "qdf_types.h" -#ifdef WLAN_FEATURE_NAN_CONVERGENCE +#ifdef WLAN_FEATURE_NAN #include "nan_public_structs.h" #include "nan_ucfg_api.h" @@ -168,6 +168,6 @@ static inline void os_if_nan_post_ndi_delete_rsp(struct wlan_objmgr_psoc *psoc, { } -#endif /* WLAN_FEATURE_NAN_CONVERGENCE */ +#endif /* WLAN_FEATURE_NAN */ #endif