From ff1ac139a2bf014be717e3591f43ec5a7a72276d Mon Sep 17 00:00:00 2001 From: jiad Date: Mon, 26 Nov 2018 16:27:48 +0800 Subject: [PATCH] qcacld-3.0: Properly featurize NAN When CONFIG_MOBILE_ROUTER is enabled there are build failures due to improper featurization of NAN, so fix the featurization. Change-Id: Ib5cd54b2d443ced73c9b99218ce28d3eb0ba8786 CRs-Fixed: 2355789 --- core/hdd/src/wlan_hdd_main.c | 6 ++++++ core/mac/src/pe/lim/lim_api.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 2a5bc26f091a..f5c5d3d471d2 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2724,6 +2724,7 @@ static void hdd_register_policy_manager_callback( } #endif +#ifdef WLAN_FEATURE_NAN_DATAPATH static void hdd_nan_register_callbacks(struct hdd_context *hdd_ctx) { struct nan_callbacks cb_obj = {0}; @@ -2741,6 +2742,11 @@ static void hdd_nan_register_callbacks(struct hdd_context *hdd_ctx) os_if_nan_register_hdd_callbacks(hdd_ctx->psoc, &cb_obj); } +#else +static inline void hdd_nan_register_callbacks(struct hdd_context *hdd_ctx) +{ +} +#endif #ifdef CONFIG_LEAK_DETECTION /** diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index a74fea721a53..57aceafa9179 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -608,6 +608,8 @@ static void lim_register_debug_callback(void) { } #endif /* WLAN_FEATURE_MEMDUMP_ENABLE */ + +#ifdef WLAN_FEATURE_NAN_CONVERGENCE static void lim_nan_register_callbacks(tpAniSirGlobal mac_ctx) { struct nan_callbacks cb_obj = {0}; @@ -618,6 +620,11 @@ static void lim_nan_register_callbacks(tpAniSirGlobal mac_ctx) ucfg_nan_register_lim_callbacks(mac_ctx->psoc, &cb_obj); } +#else +static inline void lim_nan_register_callbacks(tpAniSirGlobal mac_ctx) +{ +} +#endif /* * pe_shutdown_notifier_cb - Shutdown notifier callback