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
diff --git a/Kbuild b/Kbuild
index e74d20b..b81b5bf 100644
--- a/Kbuild
+++ b/Kbuild
@@ -131,6 +131,7 @@
 
 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 @@
 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 @@
 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_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_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_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_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_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 bb65a84..02ad238 100644
--- a/Kconfig
+++ b/Kconfig
@@ -33,11 +33,6 @@
 	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 6b0ddfa..8d93faa 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 a393699..1e59efa 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 @@
 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 @@
 {
 	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 ecad74a..757ff98 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 @@
 
 	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 @@
  *
  * 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 @@
 				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 91b7284..2f29d17 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 @@
  * @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 @@
 			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 41cf952..4a45c42 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 f2f1580..5561907 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 @@
  * 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_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 @@
 	return false;
 }
 #endif
+
 #endif
 
diff --git a/configs/default_defconfig b/configs/default_defconfig
index 1c01c13..c8bb8a5 100644
--- a/configs/default_defconfig
+++ b/configs/default_defconfig
@@ -183,12 +183,6 @@
 	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 0b9bc72..66c2442 100644
--- a/configs/genoa.common
+++ b/configs/genoa.common
@@ -20,8 +20,6 @@
 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 7ced6de..ef70d1c 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -723,7 +723,6 @@
  * @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 @@
 				(&(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 @@
 	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 768ed2f..cd5de4f 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -2694,7 +2694,7 @@
 }
 #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 1320095..c1dbe9b 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 @@
 
 #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 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 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 61bca26..6f3318b 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -4986,8 +4986,7 @@
 };
 #endif
 
-#ifdef WLAN_FEATURE_NAN_DATAPATH
-
+#ifdef WLAN_FEATURE_NAN
 #define IFACE_NAME_SIZE 64
 
 /**
@@ -5434,8 +5433,7 @@
 	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 c029947..42547fd 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -563,7 +563,7 @@
 }
 #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 c849056..fbd1300 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 @@
 {
 }
 
-#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 3ce2fbd..9079f20 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1140,7 +1140,7 @@
 	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 @@
 				       (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 80fed5a..a12d98a 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 @@
 					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 @@
 {
 }
 
-#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 e1319f7..867c4e2 100644
--- a/core/wma/inc/wma_tgt_cfg.h
+++ b/core/wma/inc/wma_tgt_cfg.h
@@ -193,7 +193,7 @@
 #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 95394fb..c2aa1f3 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 @@
 	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 @@
 	}
 	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 @@
 					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 2845186..65ac9c2 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 @@
 {
 }
 
-#endif /* WLAN_FEATURE_NAN_CONVERGENCE */
+#endif /* WLAN_FEATURE_NAN */
 
 #endif