diff --git a/cfg/cfg_all.h b/cfg/cfg_all.h index 6b0ddfa245..8d93faa92f 100644 --- a/cfg/cfg_all.h +++ b/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/nan/core/inc/wlan_nan_api.h b/nan/core/inc/wlan_nan_api.h index a393699353..1e59efab79 100644 --- a/nan/core/inc/wlan_nan_api.h +++ b/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/nan/core/src/nan_api.c b/nan/core/src/nan_api.c index ecad74af55..757ff983cd 100644 --- a/nan/core/src/nan_api.c +++ b/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/nan/core/src/nan_main_i.h b/nan/core/src/nan_main_i.h index 91b7284070..2f29d17824 100644 --- a/nan/core/src/nan_main_i.h +++ b/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/nan/dispatcher/inc/cfg_nan.h b/nan/dispatcher/inc/cfg_nan.h index 41cf95273c..4a45c4271e 100644 --- a/nan/dispatcher/inc/cfg_nan.h +++ b/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/nan/dispatcher/inc/cfg_nan_api.h b/nan/dispatcher/inc/cfg_nan_api.h index f2f1580ae4..5561907aca 100644 --- a/nan/dispatcher/inc/cfg_nan_api.h +++ b/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