From db55f19d01b8ff385387765876351af8c5b1028f Mon Sep 17 00:00:00 2001 From: Nachiket Kukade Date: Tue, 11 Dec 2018 12:07:09 +0530 Subject: [PATCH] qcacld-3.0: Set 5GHz channel for NDI start and remove the INI NDI Create from upper layers also does a start bss with the channel specified with INI "gnan_datapath_ndi_channel". It defaults to channel 6 if no value is specified. For targets with 2x2 DBS MAC Configuration this cannot happen without a DBS mode change. Since this channel is not indicative of the actual NDI channel, send a 5GHz NAN Social channel for the BSS start to avoid the DBS mode change. Send 5GHz NAN Social channel for NDI bss start and remove the corresponding INI. Change-Id: I40428f5eb4071f7c1d3934c6279316aad8082c03 CRs-Fixed: 2364619 --- nan/core/src/nan_api.c | 1 - nan/core/src/nan_main_i.h | 2 -- nan/dispatcher/inc/cfg_nan.h | 26 -------------------------- nan/dispatcher/inc/cfg_nan_api.h | 13 ------------- nan/dispatcher/src/cfg_nan.c | 11 ----------- 5 files changed, 53 deletions(-) diff --git a/nan/core/src/nan_api.c b/nan/core/src/nan_api.c index 8e435faa12..ecad74af55 100644 --- a/nan/core/src/nan_api.c +++ b/nan/core/src/nan_api.c @@ -70,7 +70,6 @@ static void nan_cfg_dp_init(struct wlan_objmgr_psoc *psoc, return; nan_obj->cfg_param.dp_enable = cfg_get(psoc, CFG_NAN_DATAPATH_ENABLE); - nan_obj->cfg_param.ndi_ch = cfg_get(psoc, CFG_NAN_NDI_CHANNEL); nan_obj->cfg_param.ndi_mac_randomize = cfg_get(psoc, CFG_NAN_RANDOMIZE_NDI_MAC); } diff --git a/nan/core/src/nan_main_i.h b/nan/core/src/nan_main_i.h index a431dfc999..91b7284070 100644 --- a/nan/core/src/nan_main_i.h +++ b/nan/core/src/nan_main_i.h @@ -80,7 +80,6 @@ enum nan_disc_state { * struct nan_cfg_params - NAN INI config params * @enable: NAN feature enable * @dp_enable: NAN Datapath feature enable - * @ndi_ch: NAN Datapath channel * @ndi_mac_randomize: Randomize NAN datapath interface MAC */ struct nan_cfg_params { @@ -89,7 +88,6 @@ struct nan_cfg_params { #endif #ifdef WLAN_FEATURE_NAN_DATAPATH bool dp_enable; - uint32_t ndi_ch; bool ndi_mac_randomize; #endif }; diff --git a/nan/dispatcher/inc/cfg_nan.h b/nan/dispatcher/inc/cfg_nan.h index 394ff20d4d..41cf95273c 100644 --- a/nan/dispatcher/inc/cfg_nan.h +++ b/nan/dispatcher/inc/cfg_nan.h @@ -72,31 +72,6 @@ 0, \ "Enable NAN Datapath support") -/* - * - * gnan_datapath_ndi_channel - Default channel for NAN Datapath - * @Min: 6 - * @Max: 149 - * @Default: 6 - * - * Host suggests this channel for NAN datapath. But FW is free to - * choose other channels based on system constraints. - * - * Related: genable_nan_datapath - * - * Supported Feature: NAN - * - * Usage: External - * - * - */ -/* - * NAN channel on which NAN data interface to start - */ -#define CFG_NAN_NDI_CHANNEL CFG_INI_UINT("gnan_datapath_ndi_channel", \ - 6, 149, 6, \ - CFG_VALUE_OR_DEFAULT, \ - "NAN Datapath Channel") /* * * gEnableNDIMacRandomization - When enabled this will randomize NDI Mac @@ -126,7 +101,6 @@ #ifdef WLAN_FEATURE_NAN_DATAPATH #define CFG_NAN_DP CFG(CFG_NAN_DATAPATH_ENABLE) \ - CFG(CFG_NAN_NDI_CHANNEL) \ CFG(CFG_NAN_RANDOMIZE_NDI_MAC) #else #define CFG_NAN_DP diff --git a/nan/dispatcher/inc/cfg_nan_api.h b/nan/dispatcher/inc/cfg_nan_api.h index c37821c973..f2f1580ae4 100644 --- a/nan/dispatcher/inc/cfg_nan_api.h +++ b/nan/dispatcher/inc/cfg_nan_api.h @@ -53,14 +53,6 @@ static inline bool cfg_nan_get_enable(struct wlan_objmgr_psoc *psoc) */ bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc); -/** - * cfg_nan_get_ndi_channel() - get NAN Datapath channel - * @psoc: pointer to psoc object - * - * This function returns NAN Datapath channel - */ -uint32_t cfg_nan_get_ndi_channel(struct wlan_objmgr_psoc *psoc); - /** * cfg_nan_get_ndi_mac_randomize() - get NDI MAC randomize enable status * @psoc: pointer to psoc object @@ -74,11 +66,6 @@ static inline bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc) return false; } -static inline uint32_t cfg_nan_get_ndi_channel(struct wlan_objmgr_psoc *psoc) -{ - return 0; -} - static inline bool cfg_nan_get_ndi_mac_randomize(struct wlan_objmgr_psoc *psoc) { return false; diff --git a/nan/dispatcher/src/cfg_nan.c b/nan/dispatcher/src/cfg_nan.c index 5b852da1f9..fd113fd542 100644 --- a/nan/dispatcher/src/cfg_nan.c +++ b/nan/dispatcher/src/cfg_nan.c @@ -56,17 +56,6 @@ bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc) return nan_obj->cfg_param.dp_enable; } -uint32_t cfg_nan_get_ndi_channel(struct wlan_objmgr_psoc *psoc) -{ - struct nan_psoc_priv_obj *nan_obj = cfg_nan_get_priv_obj(psoc); - - if (!nan_obj) { - nan_err("NAN obj null"); - return 0; - } - return nan_obj->cfg_param.ndi_ch; -} - bool cfg_nan_get_ndi_mac_randomize(struct wlan_objmgr_psoc *psoc) { struct nan_psoc_priv_obj *nan_obj = cfg_nan_get_priv_obj(psoc);