From d4d6eb7d4ecf5e00f07779d82665e031026e7e59 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Tue, 4 Dec 2018 20:30:37 +0530 Subject: [PATCH] qcacld-3.0: ADD MLME INI items of FE_BEAMFORM and WLAN_REG Add the following WLAN_REG ini configs and FE_BEAMFORM cfg items to MLME cfg: 1. WNI_CFG_11D_ENABLED 2. WNI_CFG_11H_ENABLED 3. WNI_CFG_TX_BF_CAP 4. WNI_CFG_AS_CAP 5. WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP Introduce the basic infra APIs related to these configs from mlme. In csr_roam_open_session, lim_populate_vht_mcs_set, lim_sta_send_add_bss, populate_dot11f_tdls_ht_vht_cap, populate_dot11f_vht_caps and sme_update_nss, local structure is updated instead of mlme global structure for vht caps and thus the mlme vht caps contains only the default values. Fix this by updating mlme vht caps in mlme_update_vht_cap. Change-Id: I1a948d7a44ad2bcc7f711c46b278971d7e4026e7 CRs-Fixed: 2354562 --- components/mlme/core/src/wlan_mlme_main.c | 8 ++ .../mlme/dispatcher/inc/cfg_mlme_generic.h | 46 ++++++++++++ .../mlme/dispatcher/inc/cfg_mlme_vht_caps.h | 41 ++++++++++- .../mlme/dispatcher/inc/wlan_mlme_api.h | 37 ++++++++++ .../dispatcher/inc/wlan_mlme_public_struct.h | 10 +++ .../mlme/dispatcher/inc/wlan_mlme_ucfg_api.h | 60 +++++++++++++++ .../mlme/dispatcher/src/wlan_mlme_api.c | 63 ++++++++++++++++ core/hdd/inc/wlan_hdd_cfg.h | 53 -------------- core/hdd/src/wlan_hdd_cfg.c | 37 ---------- core/hdd/src/wlan_hdd_main.c | 23 ++++-- core/hdd/src/wlan_hdd_regulatory.c | 7 +- core/hdd/src/wlan_hdd_wext.c | 36 ++++----- core/mac/inc/ani_global.h | 1 - core/mac/inc/wni_cfg.h | 5 -- core/mac/src/cfg/cfg_api.c | 7 +- core/mac/src/cfg/cfg_param_name.c | 5 -- core/mac/src/cfg/cfg_proc_msg.c | 29 -------- core/mac/src/pe/lim/lim_api.c | 6 -- core/mac/src/pe/lim/lim_assoc_utils.c | 42 ++++++----- core/mac/src/pe/lim/lim_process_cfg_updates.c | 5 +- .../src/pe/lim/lim_process_sme_req_messages.c | 35 +++------ core/mac/src/pe/lim/lim_process_tdls.c | 14 ++-- core/mac/src/pe/lim/lim_utils.c | 14 ++-- .../src/sys/legacy/src/utils/src/parser_api.c | 72 +++++++++--------- core/sme/inc/csr_api.h | 2 - core/sme/inc/csr_internal.h | 2 - core/sme/src/common/sme_api.c | 21 +++--- core/sme/src/csr/csr_api_roam.c | 73 ++++++++----------- core/sme/src/csr/csr_api_scan.c | 4 +- core/sme/src/csr/csr_util.c | 9 +-- core/wma/src/wma_scan_roam.c | 26 +------ 31 files changed, 434 insertions(+), 359 deletions(-) diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index e21b3a854c..1ab1ffe471 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -349,6 +349,9 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc, gen->debug_packet_log = cfg_get(psoc, CFG_ENABLE_DEBUG_PACKET_LOG); mlme_init_pmf_cfg(psoc, gen); mlme_init_lpass_support_cfg(psoc, gen); + + gen->enabled_11h = cfg_default(CFG_11H_SUPPORT_ENABLED); + gen->enabled_11d = cfg_default(CFG_11D_SUPPORT_ENABLED); } static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params) @@ -806,6 +809,11 @@ static void mlme_init_vht_cap_cfg(struct wlan_objmgr_psoc *psoc, if (vht_cap_info->enable2x2 && vht_cap_info->su_bformer) vht_cap_info->num_soundingdim = NUM_OF_SOUNDING_DIMENSIONS; + + vht_cap_info->tx_bf_cap = cfg_default(CFG_TX_BF_CAP); + vht_cap_info->as_cap = cfg_default(CFG_AS_CAP); + vht_cap_info->disable_ldpc_with_txbf_ap = + cfg_get(psoc, CFG_DISABLE_LDPC_WITH_TXBF_AP); } static void mlme_init_rates_in_cfg(struct wlan_objmgr_psoc *psoc, diff --git a/components/mlme/dispatcher/inc/cfg_mlme_generic.h b/components/mlme/dispatcher/inc/cfg_mlme_generic.h index 08180bcb9f..0d60a3ffbe 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_generic.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_generic.h @@ -94,6 +94,50 @@ 1, \ "RTT3 enable/disable info") +/* + * + * g11hSupportEnabled - Enable 11h support + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to set 11h support flag + * + * Related: None + * + * Supported Feature: STA + * + * Usage: Internal/External + * + * + */ +#define CFG_11H_SUPPORT_ENABLED CFG_INI_BOOL( \ + "g11hSupportEnabled", \ + 1, \ + "11h Enable Flag") + +/* + * + * g11dSupportEnabled - Enable 11d support + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to set 11d support flag + * + * Related: None + * + * Supported Feature: STA + * + * Usage: Internal/External + * + * + */ +#define CFG_11D_SUPPORT_ENABLED CFG_INI_BOOL( \ + "g11dSupportEnabled", \ + 1, \ + "11d Enable Flag") + /* * * BandCapability - Preferred band (0: Both, 1: 2.4G only, 2: 5G only) @@ -494,6 +538,8 @@ CFG(CFG_PMF_SA_QUERY_RETRY_INTERVAL) \ CFG(CFG_ENABLE_RTT_MAC_RANDOMIZATION) \ CFG(CFG_RTT3_ENABLE) \ + CFG(CFG_11H_SUPPORT_ENABLED) \ + CFG(CFG_11D_SUPPORT_ENABLED) \ CFG(CFG_BAND_CAPABILITY) \ CFG(CFG_PREVENT_LINK_DOWN) \ CFG(CFG_SELECT_5GHZ_MARGIN) \ diff --git a/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h b/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h index ba4ef5f5d8..dc664ccb78 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h @@ -126,6 +126,42 @@ CFG_VALUE_OR_DEFAULT, \ "VHT TX SUPP DATA RATE") +#define CFG_TX_BF_CAP CFG_INT( \ + "tx_bf_cap", \ + 0, \ + -1, \ + 0, \ + CFG_VALUE_OR_DEFAULT, \ + "TX BF CAP") + +#define CFG_AS_CAP CFG_UINT( \ + "as_cap", \ + 0, \ + 255, \ + 0, \ + CFG_VALUE_OR_DEFAULT, \ + "AS CAP") + +/* + * + * gDisableLDPCWithTxbfAP - Disable LDPC with tx bf AP + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * Related: NA + * + * Supported Feature: 11AC + * + * Usage: External + * + * + */ +#define CFG_DISABLE_LDPC_WITH_TXBF_AP CFG_INI_BOOL( \ + "gDisableLDPCWithTxbfAP", \ + 0, \ + "Disable LDPC with tx bf AP") + /* * * gTxBFEnable - Enables SU beamformee caps @@ -591,6 +627,9 @@ CFG(CFG_VHT_AMPDU_LEN_EXPONENT) \ CFG(CFG_VHT_MPDU_LEN) \ CFG(CFG_VHT_ENABLE_TXBF_SAP_MODE) \ - CFG(CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE) + CFG(CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE) \ + CFG(CFG_TX_BF_CAP) \ + CFG(CFG_AS_CAP) \ + CFG(CFG_DISABLE_LDPC_WITH_TXBF_AP) #endif /* __CFG_MLME_VHT_CAPS_H */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index 34dd11b67a..9b6fd49b98 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -1857,4 +1857,41 @@ QDF_STATUS wlan_mlme_is_sap_uapsd_enabled(struct wlan_objmgr_psoc *psoc, */ QDF_STATUS wlan_mlme_set_sap_uapsd_flag(struct wlan_objmgr_psoc *psoc, bool value); + +/** + * wlan_mlme_is_11h_enabled() - Get the 11h flag + * @psoc: psoc context + * + * Return: QDF_STATUS + */ +QDF_STATUS +wlan_mlme_is_11h_enabled(struct wlan_objmgr_psoc *psoc, bool *value); + +/** + * wlan_mlme_set_11h_enabled() - Set the 11h flag + * @psoc: psoc context + * + * Return: QDF_STATUS + */ +QDF_STATUS +wlan_mlme_set_11h_enabled(struct wlan_objmgr_psoc *psoc, bool value); + +/** + * wlan_mlme_is_11d_enabled() - Get the 11d flag + * @psoc: psoc context + * + * Return: QDF_STATUS + */ +QDF_STATUS +wlan_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value); + +/** + * wlan_mlme_set_11d_enabled() - Set the 11h flag + * @psoc: psoc context + * + * Return: QDF_STATUS + */ +QDF_STATUS +wlan_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value); + #endif /* _WLAN_MLME_API_H_ */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 3a59cd7fa9..65df894c29 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -646,6 +646,9 @@ struct wlan_mlme_mbo { * @ampdu_len: To handle maximum receive AMPDU ampdu len * @tx_bfee_sap: enable tx bfee SAp * @subfee_vendor_vhtie: enable subfee vendor vht ie + * @tx_bf_cap: Transmit bf capability + * @as_cap: Antenna sharing capability info + * @disable_ldpc_with_txbf_ap: Disable ldpc capability */ struct mlme_vht_capabilities_info { uint8_t supp_chan_width; @@ -686,6 +689,9 @@ struct mlme_vht_capabilities_info { uint8_t ampdu_len; bool tx_bfee_sap; bool vendor_vhtie; + uint8_t tx_bf_cap; + uint8_t as_cap; + bool disable_ldpc_with_txbf_ap; }; /** @@ -902,6 +908,8 @@ struct wlan_mlme_chainmask { * @optimize_ca_event: Enable/Disable Optimization of CA events * @fw_timeout_crash: Enable/Disable FW Timeout Crash * * @debug_packet_log: Debug packet log flags + * @enabled_11h: enable 11h flag + * @enabled_11d: enable 11d flag */ struct wlan_mlme_generic { enum band_info band_capability; @@ -925,6 +933,8 @@ struct wlan_mlme_generic { bool optimize_ca_event; bool fw_timeout_crash; uint8_t debug_packet_log; + bool enabled_11h; + bool enabled_11d; }; /* diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h index 908d9bf768..ab08b1abaa 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h @@ -2358,6 +2358,66 @@ ucfg_mlme_update_nss_vht_cap(struct wlan_objmgr_psoc *psoc) return mlme_update_nss_vht_cap(psoc); } +/** + * ucfg_mlme_is_11h_enabled() - Get 11h flag + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline QDF_STATUS +ucfg_mlme_is_11h_enabled(struct wlan_objmgr_psoc *psoc, bool *value) +{ + return wlan_mlme_is_11h_enabled(psoc, value); +} + +/** + * ucfg_mlme_set_11h_enabled() - Set 11h flag + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline QDF_STATUS +ucfg_mlme_set_11h_enabled(struct wlan_objmgr_psoc *psoc, bool value) +{ + return wlan_mlme_set_11h_enabled(psoc, value); +} + +/** + * ucfg_mlme_is_11d_enabled() - Get 11d flag + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline QDF_STATUS +ucfg_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value) +{ + return wlan_mlme_is_11d_enabled(psoc, value); +} + +/** + * ucfg_mlme_set_11d_enabled() - Set 11d flag + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline QDF_STATUS +ucfg_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value) +{ + return wlan_mlme_set_11d_enabled(psoc, value); +} + /** * ucfg_mlme_get_opr_rate_set() - Get operational rate set * @psoc: pointer to psoc object diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index 6bd024531e..093b8a6da7 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -2351,6 +2351,69 @@ QDF_STATUS mlme_set_wep_key(struct wlan_mlme_wep_cfg *wep_params, return QDF_STATUS_SUCCESS; } +QDF_STATUS +wlan_mlme_is_11h_enabled(struct wlan_objmgr_psoc *psoc, bool *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.gen.enabled_11h; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS +wlan_mlme_set_11h_enabled(struct wlan_objmgr_psoc *psoc, bool value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + mlme_obj->cfg.gen.enabled_11h = value; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS +wlan_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.gen.enabled_11d; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS +wlan_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + mlme_obj->cfg.gen.enabled_11d = value; + + return QDF_STATUS_SUCCESS; +} QDF_STATUS wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc, uint8_t value) { diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 242bf9ad79..72cf8283fe 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -86,28 +86,6 @@ struct hdd_context; #define CFG_ENABLE_CONNECTED_SCAN_MAX (1) #define CFG_ENABLE_CONNECTED_SCAN_DEFAULT (1) -/* - * - * g11dSupportEnabled - Enable/Disable 11d support - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to enable or disable 11d support. - * - * Related: None - * - * Supported Feature: STA - * - * Usage: Internal/External - * - * - */ -#define CFG_11D_SUPPORT_ENABLED_NAME "g11dSupportEnabled" -#define CFG_11D_SUPPORT_ENABLED_MIN WNI_CFG_11D_ENABLED_STAMIN -#define CFG_11D_SUPPORT_ENABLED_MAX WNI_CFG_11D_ENABLED_STAMAX -#define CFG_11D_SUPPORT_ENABLED_DEFAULT WNI_CFG_11D_ENABLED_STADEF /* Default is ON */ - /* * * enable_11d_in_world_mode - enable 11d in world mode @@ -127,29 +105,6 @@ struct hdd_context; #define CFG_ENABLE_11D_IN_WORLD_MODE_MAX (1) #define CFG_ENABLE_11D_IN_WORLD_MODE_DEFAULT (0) -/* - * - * g11hSupportEnabled - Enable/Disable 11h support - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to enable or disable 11h support. - * - * Related: None - * - * Supported Feature: STA - * - * Usage: Internal/External - * - * - */ - -#define CFG_11H_SUPPORT_ENABLED_NAME "g11hSupportEnabled" -#define CFG_11H_SUPPORT_ENABLED_MIN (0) -#define CFG_11H_SUPPORT_ENABLED_MAX (1) -#define CFG_11H_SUPPORT_ENABLED_DEFAULT (1) /* Default is ON */ - #define CFG_REG_CHANGE_DEF_COUNTRY_NAME "gRegulatoryChangeCountry" #define CFG_REG_CHANGE_DEF_COUNTRY_DEFAULT (0) #define CFG_REG_CHANGE_DEF_COUNTRY_MIN (0) @@ -2744,11 +2699,6 @@ enum hdd_link_speed_rpt_type { #define CFG_ENABLE_TX_STBC_MAX (1) #define CFG_ENABLE_TX_STBC_DEFAULT (0) -#define CFG_DISABLE_LDPC_WITH_TXBF_AP "gDisableLDPCWithTxbfAP" -#define CFG_DISABLE_LDPC_WITH_TXBF_AP_MIN (0) -#define CFG_DISABLE_LDPC_WITH_TXBF_AP_MAX (1) -#define CFG_DISABLE_LDPC_WITH_TXBF_AP_DEFAULT (0) - /* * * gEnableSNRMonitoring - Enables SNR Monitoring @@ -4914,8 +4864,6 @@ struct hdd_config { /* Config parameters */ bool enable_connected_scan; - bool Is11dSupportEnabled; - bool Is11hSupportEnabled; char PowerUsageControl[4]; bool fSupplicantCountryCodeHasPriority; bool fIsImpsEnabled; @@ -5042,7 +4990,6 @@ struct hdd_config { bool enableFirstScan2GOnly; bool prevent_link_down; uint8_t scanAgingTimeout; - uint8_t disableLDPCWithTxbfAP; bool fEnableSNRMonitoring; /*PNO related parameters */ #ifdef FEATURE_WLAN_SCAN_PNO diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index c43d904e28..e5d1a1912b 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -56,21 +56,6 @@ struct reg_table_entry g_registry_table[] = { CFG_ENABLE_CONNECTED_SCAN_MIN, CFG_ENABLE_CONNECTED_SCAN_MAX), - REG_VARIABLE(CFG_11D_SUPPORT_ENABLED_NAME, WLAN_PARAM_Integer, - struct hdd_config, Is11dSupportEnabled, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK, - CFG_11D_SUPPORT_ENABLED_DEFAULT, - CFG_11D_SUPPORT_ENABLED_MIN, - CFG_11D_SUPPORT_ENABLED_MAX), - - REG_VARIABLE(CFG_11H_SUPPORT_ENABLED_NAME, WLAN_PARAM_Integer, - struct hdd_config, Is11hSupportEnabled, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK, - CFG_11H_SUPPORT_ENABLED_DEFAULT, - CFG_11H_SUPPORT_ENABLED_MIN, - CFG_11H_SUPPORT_ENABLED_MAX), - - REG_VARIABLE(CFG_ENABLE_IMPS_NAME, WLAN_PARAM_Integer, struct hdd_config, fIsImpsEnabled, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -515,13 +500,6 @@ struct reg_table_entry g_registry_table[] = { CFG_IBSS_ADHOC_CHANNEL_24GHZ_MIN, CFG_IBSS_ADHOC_CHANNEL_24GHZ_MAX), - REG_VARIABLE(CFG_DISABLE_LDPC_WITH_TXBF_AP, WLAN_PARAM_Integer, - struct hdd_config, disableLDPCWithTxbfAP, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_DISABLE_LDPC_WITH_TXBF_AP_DEFAULT, - CFG_DISABLE_LDPC_WITH_TXBF_AP_MIN, - CFG_DISABLE_LDPC_WITH_TXBF_AP_MAX), - REG_VARIABLE(CFG_ENABLE_SNR_MONITORING_NAME, WLAN_PARAM_Integer, struct hdd_config, fEnableSNRMonitoring, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK, @@ -2628,18 +2606,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx) hdd_err("Fail to pass WNI_CFG_PS_WOW_DATA_INACTIVITY_TO CFG"); } - if (sme_cfg_set_int(mac_handle, WNI_CFG_11D_ENABLED, - config->Is11dSupportEnabled) == QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_11D_ENABLED to CFG"); - } - - if (sme_cfg_set_int(mac_handle, WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP, - config->disableLDPCWithTxbfAP) == QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP to CFG"); - } - if (sme_cfg_set_int(mac_handle, WNI_CFG_IBSS_ATIM_WIN_SIZE, config->ibssATIMWinSize) == QDF_STATUS_E_FAILURE) { @@ -2818,8 +2784,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx) /* Config params obtained from the registry * To Do: set regulatory information here */ - smeConfig->csrConfig.Is11dSupportEnabled = pConfig->Is11dSupportEnabled; - smeConfig->csrConfig.phyMode = hdd_cfg_xlate_to_csr_phy_mode(pConfig->dot11Mode); @@ -2888,7 +2852,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx) smeConfig->csrConfig.AdHocChannel24 = pConfig->AdHocChannel24G; smeConfig->csrConfig.ProprietaryRatesEnabled = 0; smeConfig->csrConfig.HeartbeatThresh50 = 40; - smeConfig->csrConfig.Is11hSupportEnabled = pConfig->Is11hSupportEnabled; smeConfig->csrConfig.nTxPowerCap = pConfig->nTxPowerCap; smeConfig->csrConfig.fEnableDFSChnlScan = pConfig->enableDFSChnlScan; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 9c3462c743..f5ae08e63f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9025,6 +9025,7 @@ void hdd_acs_response_timeout_handler(void *context) */ static void hdd_override_ini_config(struct hdd_context *hdd_ctx) { + QDF_STATUS status; if (0 == enable_dfs_chan_scan || 1 == enable_dfs_chan_scan) { hdd_ctx->config->enableDFSChnlScan = enable_dfs_chan_scan; @@ -9032,8 +9033,9 @@ static void hdd_override_ini_config(struct hdd_context *hdd_ctx) enable_dfs_chan_scan); } if (0 == enable_11d || 1 == enable_11d) { - hdd_ctx->config->Is11dSupportEnabled = enable_11d; - hdd_debug("Module enable_11d set to %d", enable_11d); + status = ucfg_mlme_set_11d_enabled(hdd_ctx->psoc, enable_11d); + if (!QDF_IS_STATUS_SUCCESS(status)) + hdd_err("Failed to set 11d_enable flag"); } if (hdd_ctx->config->action_oui_enable && !ucfg_action_oui_enabled()) { @@ -9814,6 +9816,7 @@ static int hdd_update_user_config(struct hdd_context *hdd_ctx) bool skip_dfs_in_p2p_search = false; uint8_t band_capability; QDF_STATUS status; + bool value = false; status = ucfg_mlme_get_band_capability(hdd_ctx->psoc, &band_capability); if (QDF_IS_STATUS_ERROR(status)) @@ -9828,10 +9831,18 @@ static int hdd_update_user_config(struct hdd_context *hdd_ctx) hdd_ctx->config->dual_mac_feature_disable; user_config->indoor_channel_support = hdd_ctx->config->indoor_channel_support; - user_config->is_11d_support_enabled = - hdd_ctx->config->Is11dSupportEnabled; - user_config->is_11h_support_enabled = - hdd_ctx->config->Is11hSupportEnabled; + + status = ucfg_mlme_is_11d_enabled(hdd_ctx->psoc, &value); + if (!QDF_IS_STATUS_SUCCESS(status)) + hdd_err("Invalid 11d_enable flag"); + user_config->is_11d_support_enabled = value; + + value = false; + status = ucfg_mlme_is_11h_enabled(hdd_ctx->psoc, &value); + if (!QDF_IS_STATUS_SUCCESS(status)) + hdd_err("Invalid 11h_enable flag"); + user_config->is_11h_support_enabled = value; + cfg_p2p_get_skip_dfs_channel_p2p_search(hdd_ctx->psoc, &skip_dfs_in_p2p_search); user_config->skip_dfs_chnl_in_p2p_search = skip_dfs_in_p2p_search; diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index 421d9e9c12..16a435d724 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -210,12 +210,17 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx, uint8_t band_capability = 0; QDF_STATUS status; bool country_priority = 0; + bool value = false; status = ucfg_mlme_get_band_capability(hdd_ctx->psoc, &band_capability); if (QDF_IS_STATUS_ERROR(status)) hdd_err("Failed to get MLME band cap, defaulting to BAND_ALL"); - config_vars->enable_11d_support = hdd_ctx->config->Is11dSupportEnabled; + status = ucfg_mlme_is_11d_enabled(hdd_ctx->psoc, &value); + if (!QDF_IS_STATUS_SUCCESS(status)) + hdd_err("Invalid 11d_enable flag"); + config_vars->enable_11d_support = value; + config_vars->scan_11d_interval = hdd_ctx->config->scan_11d_interval; ucfg_mlme_get_sap_country_priority(hdd_ctx->psoc, &country_priority); diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 5aa45bb87e..e6a0bfb5b4 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -3943,11 +3943,13 @@ int wlan_hdd_update_phymode(struct hdd_adapter *adapter, int new_phymode) goto free; } - if (curr_band == BAND_2G) - sme_config->csrConfig.Is11hSupportEnabled = 0; - else - sme_config->csrConfig.Is11hSupportEnabled = - phddctx->config->Is11hSupportEnabled; + if (curr_band == BAND_2G) { + status = ucfg_mlme_set_11h_enabled(phddctx->psoc, 0); + if (!QDF_IS_STATUS_SUCCESS(status)) { + hdd_err("Failed to set 11h_enable flag"); + goto free; + } + } if (curr_band == BAND_2G) sme_config->csrConfig.channelBondingMode24GHz = chwidth; else if (curr_band == BAND_5G) @@ -4085,9 +4087,9 @@ free_config: static int hdd_we_set_11d_state(struct hdd_adapter *adapter, int state_11d) { struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); - tSmeConfigParams *sme_config; bool enable_11d; mac_handle_t mac_handle = hdd_ctx->mac_handle; + QDF_STATUS status; if (!mac_handle) return -EINVAL; @@ -4103,17 +4105,9 @@ static int hdd_we_set_11d_state(struct hdd_adapter *adapter, int state_11d) return -EINVAL; } - sme_config = qdf_mem_malloc(sizeof(*sme_config)); - if (!sme_config) { - hdd_err("failed to allocate memory for sme_config"); - return -ENOMEM; - } - - sme_get_config_param(mac_handle, sme_config); - sme_config->csrConfig.Is11dSupportEnabled = enable_11d; - sme_update_config(mac_handle, sme_config); - - qdf_mem_free(sme_config); + status = ucfg_mlme_set_11d_enabled(hdd_ctx->psoc, enable_11d); + if (!QDF_IS_STATUS_SUCCESS(status)) + hdd_err("Invalid 11d_enable flag"); hdd_debug("11D state=%d", enable_11d); @@ -5654,10 +5648,10 @@ static int __iw_setnone_getint(struct net_device *dev, switch (value[0]) { case WE_GET_11D_STATE: { - sme_get_config_param(mac_handle, sme_config); - - *value = sme_config->csrConfig.Is11dSupportEnabled; - + status = ucfg_mlme_is_11d_enabled(hdd_ctx->psoc, &bval); + if (!QDF_IS_STATUS_SUCCESS(status)) + hdd_err("Invalid 11d_enable flag"); + *value = bval; hdd_debug("11D state=%d!!", *value); break; diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index d2149c09d4..4a4b0cb1b4 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -533,7 +533,6 @@ typedef struct sAniSirLim { /* admission control policy information */ tLimAdmitPolicyInfo admitPolicyInfo; qdf_mutex_t lkPeGlobalLock; - uint8_t disableLDPCWithTxbfAP; #ifdef FEATURE_WLAN_TDLS uint8_t gLimTDLSBufStaEnabled; uint8_t gLimTDLSUapsdMask; diff --git a/core/mac/inc/wni_cfg.h b/core/mac/inc/wni_cfg.h index d1619fde43..5cf362342f 100644 --- a/core/mac/inc/wni_cfg.h +++ b/core/mac/inc/wni_cfg.h @@ -30,19 +30,14 @@ enum { WNI_CFG_DOT11_MODE, WNI_CFG_VALID_CHANNEL_LIST, WNI_CFG_APSD_ENABLED, - WNI_CFG_11D_ENABLED, WNI_CFG_CURRENT_TX_POWER_LEVEL, WNI_CFG_COUNTRY_CODE, - WNI_CFG_11H_ENABLED, WNI_CFG_LOCAL_POWER_CONSTRAINT, WNI_CFG_SCAN_CONTROL_LIST, - WNI_CFG_TX_BF_CAP, - WNI_CFG_AS_CAP, WNI_CFG_SCAN_IN_POWERSAVE, WNI_CFG_IBSS_AUTO_BSSID, WNI_CFG_WPS_UUID, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, - WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP, WNI_CFG_IBSS_ATIM_WIN_SIZE, WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT, WNI_CFG_OBSS_DETECTION_OFFLOAD, diff --git a/core/mac/src/cfg/cfg_api.c b/core/mac/src/cfg/cfg_api.c index 31f2661b65..46674a43ae 100644 --- a/core/mac/src/cfg/cfg_api.c +++ b/core/mac/src/cfg/cfg_api.c @@ -710,12 +710,7 @@ QDF_STATUS cfg_get_capability_info(struct mac_context *mac, uint16_t *pCap, /* Spectrum Management bit */ if (!LIM_IS_IBSS_ROLE(pe_session) && pe_session->lim11hEnable) { - if (wlan_cfg_get_int(mac, WNI_CFG_11H_ENABLED, &val) != - QDF_STATUS_SUCCESS) { - pe_err("cfg get WNI_CFG_11H_ENABLED failed"); - return QDF_STATUS_E_FAILURE; - } - if (val) + if (mac->mlme_cfg->gen.enabled_11h) pCapInfo->spectrumMgt = 1; } /* QoS bit */ diff --git a/core/mac/src/cfg/cfg_param_name.c b/core/mac/src/cfg/cfg_param_name.c index 1c3b72e83f..a7c5704332 100644 --- a/core/mac/src/cfg/cfg_param_name.c +++ b/core/mac/src/cfg/cfg_param_name.c @@ -45,18 +45,13 @@ const char *cfg_get_string(uint16_t cfg_id) CASE_RETURN_STRING(WNI_CFG_DOT11_MODE); CASE_RETURN_STRING(WNI_CFG_VALID_CHANNEL_LIST); CASE_RETURN_STRING(WNI_CFG_APSD_ENABLED); - CASE_RETURN_STRING(WNI_CFG_11D_ENABLED); CASE_RETURN_STRING(WNI_CFG_CURRENT_TX_POWER_LEVEL); CASE_RETURN_STRING(WNI_CFG_COUNTRY_CODE); - CASE_RETURN_STRING(WNI_CFG_11H_ENABLED); CASE_RETURN_STRING(WNI_CFG_LOCAL_POWER_CONSTRAINT); CASE_RETURN_STRING(WNI_CFG_SCAN_CONTROL_LIST); - CASE_RETURN_STRING(WNI_CFG_TX_BF_CAP); - CASE_RETURN_STRING(WNI_CFG_AS_CAP); CASE_RETURN_STRING(WNI_CFG_IBSS_AUTO_BSSID); CASE_RETURN_STRING(WNI_CFG_WPS_UUID); CASE_RETURN_STRING(WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED); - CASE_RETURN_STRING(WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP); CASE_RETURN_STRING(WNI_CFG_IBSS_ATIM_WIN_SIZE); CASE_RETURN_STRING(WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT); CASE_RETURN_STRING(WNI_CFG_OBSS_DETECTION_OFFLOAD); diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c index c4690ee08a..b13a53cb51 100644 --- a/core/mac/src/cfg/cfg_proc_msg.c +++ b/core/mac/src/cfg/cfg_proc_msg.c @@ -54,12 +54,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = { WNI_CFG_APSD_ENABLED_STAMIN, WNI_CFG_APSD_ENABLED_STAMAX, WNI_CFG_APSD_ENABLED_STADEF}, - {WNI_CFG_11D_ENABLED, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | - CFG_CTL_RESTART, - WNI_CFG_11D_ENABLED_STAMIN, - WNI_CFG_11D_ENABLED_STAMAX, - WNI_CFG_11D_ENABLED_STADEF}, {WNI_CFG_CURRENT_TX_POWER_LEVEL, CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT, WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMIN, @@ -68,12 +62,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = { {WNI_CFG_COUNTRY_CODE, CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_NTF_SCH, 0, 0, 0}, - {WNI_CFG_11H_ENABLED, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | - CFG_CTL_RESTART, - WNI_CFG_11H_ENABLED_STAMIN, - WNI_CFG_11H_ENABLED_STAMAX, - WNI_CFG_11H_ENABLED_STADEF}, {WNI_CFG_LOCAL_POWER_CONSTRAINT, CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | CFG_CTL_RESTART, @@ -84,18 +72,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = { CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_RESTART | CFG_CTL_NTF_LIM, 0, 0, 0}, - {WNI_CFG_TX_BF_CAP, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_INT | CFG_CTL_RESTART | - CFG_CTL_NTF_LIM, - WNI_CFG_TX_BF_CAP_STAMIN, - 4294967295u, - WNI_CFG_TX_BF_CAP_STADEF}, - {WNI_CFG_AS_CAP, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | CFG_CTL_SAVE | - CFG_CTL_RESTART | CFG_CTL_NTF_LIM, - WNI_CFG_AS_CAP_STAMIN, - WNI_CFG_AS_CAP_STAMAX, - WNI_CFG_AS_CAP_STADEF}, {WNI_CFG_SCAN_IN_POWERSAVE, CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | CFG_CTL_NTF_LIM, @@ -115,11 +91,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = { WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMIN, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STADEF}, - {WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT, - WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP_STAMIN, - WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP_STAMAX, - WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP_STADEF}, {WNI_CFG_IBSS_ATIM_WIN_SIZE, CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT, WNI_CFG_IBSS_ATIM_WIN_SIZE_STAMIN, diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index ec1fe0af15..755c03ff78 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -301,12 +301,6 @@ static QDF_STATUS __lim_init_config(struct mac_context *mac) /* This was initially done after resume notification from HAL. Now, DAL is started before PE so this can be done here */ handle_ht_capabilityand_ht_info(mac, NULL); - if (QDF_STATUS_SUCCESS != - wlan_cfg_get_int(mac, WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP, - (uint32_t *) &mac->lim.disableLDPCWithTxbfAP)) { - pe_err("cfg get disableLDPCWithTxbfAP failed"); - return QDF_STATUS_E_FAILURE; - } #ifdef FEATURE_WLAN_TDLS status = cfg_tdls_get_buffer_sta_enable(mac->psoc, &valb); if (QDF_STATUS_SUCCESS != status) { diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index d1376cc3d4..0bc4c7be15 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -1341,20 +1341,21 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx, uint32_t self_sta_dot11mode = 0; uint16_t mcs_map_mask = MCSMAPMASK1x1; uint16_t mcs_map_mask2x2 = 0; - struct mlme_vht_capabilities_info vht_cap_info; + struct mlme_vht_capabilities_info *vht_cap_info; wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_sta_dot11mode); if (!IS_DOT11_MODE_VHT(self_sta_dot11mode)) return QDF_STATUS_SUCCESS; - vht_cap_info = mac_ctx->mlme_cfg->vht_caps.vht_cap_info; + vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info; - rates->vhtRxMCSMap = (uint16_t)vht_cap_info.rx_mcs_map; - rates->vhtTxMCSMap = (uint16_t)vht_cap_info.tx_mcs_map; + rates->vhtRxMCSMap = (uint16_t)vht_cap_info->rx_mcs_map; + rates->vhtTxMCSMap = (uint16_t)vht_cap_info->tx_mcs_map; rates->vhtRxHighestDataRate = - (uint16_t)vht_cap_info.rx_supp_data_rate; - rates->vhtTxHighestDataRate = (uint16_t)vht_cap_info.tx_supp_data_rate; + (uint16_t)vht_cap_info->rx_supp_data_rate; + rates->vhtTxHighestDataRate = + (uint16_t)vht_cap_info->tx_supp_data_rate; if (NSS_1x1_MODE == nss) { rates->vhtRxMCSMap |= VHT_MCS_1x1; @@ -1364,7 +1365,7 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx, rates->vhtRxHighestDataRate = VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1; if (session_entry && !session_entry->ch_width && - !vht_cap_info.enable_vht20_mcs9 && + !vht_cap_info->enable_vht20_mcs9 && ((rates->vhtRxMCSMap & VHT_1x1_MCS_MASK) == VHT_1x1_MCS9_MAP)) { DISABLE_VHT_MCS_9(rates->vhtRxMCSMap, @@ -1374,9 +1375,9 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx, } } else { if (session_entry && !session_entry->ch_width && - !mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_vht20_mcs9 && - ((rates->vhtRxMCSMap & VHT_2x2_MCS_MASK) == - VHT_2x2_MCS9_MAP)) { + !vht_cap_info->enable_vht20_mcs9 && + ((rates->vhtRxMCSMap & VHT_2x2_MCS_MASK) == + VHT_2x2_MCS9_MAP)) { DISABLE_VHT_MCS_9(rates->vhtRxMCSMap, NSS_2x2_MODE); DISABLE_VHT_MCS_9(rates->vhtTxMCSMap, @@ -1440,7 +1441,7 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx, } pe_debug("enable2x2 - %d nss %d vhtRxMCSMap - %x vhtTxMCSMap - %x", - mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable2x2, nss, + vht_cap_info->enable2x2, nss, rates->vhtRxMCSMap, rates->vhtTxMCSMap); if (NULL != session_entry) { @@ -2118,6 +2119,9 @@ lim_add_sta(struct mac_context *mac_ctx, tLimIbssPeerNode *peer_node; /* for IBSS mode */ const uint8_t *p2p_ie = NULL; tDot11fIEVHTCaps vht_caps; + struct mlme_vht_capabilities_info *vht_cap_info; + + vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info; sir_copy_mac_addr(sta_mac, session_entry->selfMacAddr); @@ -2310,7 +2314,7 @@ lim_add_sta(struct mac_context *mac_ctx, * HT/VHT capability */ if (add_sta_params->vhtTxBFCapable - && mac_ctx->lim.disableLDPCWithTxbfAP) { + && vht_cap_info->disable_ldpc_with_txbf_ap) { add_sta_params->htLdpcCapable = 0; add_sta_params->vhtLdpcCapable = 0; } else { @@ -3577,9 +3581,9 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp tDot11fIEVHTOperation *vht_oper = NULL; tAddStaParams *sta_context; uint32_t listen_interval = MLME_CFG_LISTEN_INTERVAL; - struct mlme_vht_capabilities_info vht_cap_info; + struct mlme_vht_capabilities_info *vht_cap_info; - vht_cap_info = mac->mlme_cfg->vht_caps.vht_cap_info; + vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info; /* Package SIR_HAL_ADD_BSS_REQ message parameters */ pAddBssParams = qdf_mem_malloc(sizeof(tAddBssParams)); @@ -3861,7 +3865,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp pe_session->ch_width; } else { sta_context->ch_width = CH_WIDTH_20MHZ; - if (!vht_cap_info.enable_txbf_20mhz) + if (!vht_cap_info->enable_txbf_20mhz) sta_context->vhtTxBFCapable = 0; } @@ -3914,7 +3918,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp pAssocRsp->HTCaps.maxRxAMPDUFactor; } if (pAddBssParams->staContext.vhtTxBFCapable - && mac->lim.disableLDPCWithTxbfAP) { + && vht_cap_info->disable_ldpc_with_txbf_ap) { pAddBssParams->staContext.htLdpcCapable = 0; pAddBssParams->staContext.vhtLdpcCapable = 0; } else { @@ -4108,9 +4112,11 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac, uint8_t updat tDot11fIEVHTOperation *vht_oper = NULL; tDot11fIEVHTCaps *vht_caps = NULL; uint32_t listen_interval = MLME_CFG_LISTEN_INTERVAL; - tpSirBssDescription bssDescription = &pe_session->pLimJoinReq->bssDescription; + struct mlme_vht_capabilities_info *vht_cap_info; + + vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info; pBeaconStruct = qdf_mem_malloc(sizeof(tSchBeaconStruct)); if (!pBeaconStruct) @@ -4425,7 +4431,7 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac, uint8_t updat pAddBssParams->staContext.maxAmpduSize = pBeaconStruct->HTCaps.maxRxAMPDUFactor; if (pAddBssParams->staContext.vhtTxBFCapable - && mac->lim.disableLDPCWithTxbfAP) { + && vht_cap_info->disable_ldpc_with_txbf_ap) { pAddBssParams->staContext.htLdpcCapable = 0; pAddBssParams->staContext.vhtLdpcCapable = 0; } else { diff --git a/core/mac/src/pe/lim/lim_process_cfg_updates.c b/core/mac/src/pe/lim/lim_process_cfg_updates.c index eaee1d036a..655a909ad6 100644 --- a/core/mac/src/pe/lim/lim_process_cfg_updates.c +++ b/core/mac/src/pe/lim/lim_process_cfg_updates.c @@ -213,7 +213,6 @@ void lim_apply_configuration(struct mac_context *mac, struct pe_session *pe_sess static void lim_update_config(struct mac_context *mac, struct pe_session *pe_session) { - uint32_t val; bool enabled; pe_session->beaconParams.fShortPreamble = @@ -244,9 +243,7 @@ static void lim_update_config(struct mac_context *mac, struct pe_session *pe_ses if (pe_session->limWsmEnabled && LIM_IS_AP_ROLE(pe_session)) pe_session->limHcfEnabled = 1; - if (wlan_cfg_get_int(mac, WNI_CFG_11D_ENABLED, &val) != QDF_STATUS_SUCCESS) - pe_err("cfg get 11d enabled failed"); - pe_session->lim11dEnabled = (val) ? 1 : 0; + pe_session->lim11dEnabled = mac->mlme_cfg->gen.enabled_11d ? 1 : 0; pe_debug("Updated Lim shadow state based on CFG"); } diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index 9279d56852..66e1f48473 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -1009,11 +1009,8 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu if (mlm_start_req->bssType != eSIR_IBSS_MODE && (CHAN_HOP_ALL_BANDS_ENABLE || BAND_5G == session->limRFBand)) { - if (wlan_cfg_get_int(mac_ctx, - WNI_CFG_11H_ENABLED, &val) != QDF_STATUS_SUCCESS) - pe_err("Fail to get WNI_CFG_11H_ENABLED"); - else - session->lim11hEnable = val; + session->lim11hEnable = + mac_ctx->mlme_cfg->gen.enabled_11h; if (session->lim11hEnable && (eSIR_INFRA_AP_MODE == @@ -1711,19 +1708,11 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, uint32_t *msg_buf) lim_get_rf_band(session->currentOperChannel); /* Initialize 11h Enable Flag */ - if (BAND_5G == session->limRFBand) { - if (wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED, - &val) != QDF_STATUS_SUCCESS) { - pe_err("Fail to get WNI_CFG_11H_ENABLED"); - session->lim11hEnable = - WNI_CFG_11H_ENABLED_STADEF; - } else { - session->lim11hEnable = val; - } - } else { + if (session->limRFBand == BAND_5G) + session->lim11hEnable = + mac_ctx->mlme_cfg->gen.enabled_11h; + else session->lim11hEnable = 0; - } - /* * To care of the scenario when STA transitions from * IBSS to Infrastructure mode. @@ -5220,7 +5209,6 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx, struct pe_session *session_entry; uint8_t session_id; /* PE session_id */ int8_t max_tx_pwr; - uint32_t val = 0; if (msg_buf == NULL) { pe_err("msg_buf is NULL"); @@ -5291,13 +5279,12 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx, /* Initialize 11h Enable Flag */ if (CHAN_HOP_ALL_BANDS_ENABLE || - BAND_5G == session_entry->limRFBand) { - if (wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED, &val) != - QDF_STATUS_SUCCESS) - pe_err("Fail to get WNI_CFG_11H_ENABLED"); - } + session_entry->limRFBand == BAND_5G) + session_entry->lim11hEnable = + mac_ctx->mlme_cfg->gen.enabled_11h; + else + session_entry->lim11hEnable = 0; - session_entry->lim11hEnable = val; session_entry->dot11mode = ch_change_req->dot11mode; session_entry->nwType = ch_change_req->nw_type; qdf_mem_copy(&session_entry->rateSet, diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index 2f189383b8..93a723f70a 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -699,9 +699,9 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac, { uint8_t nss; qdf_size_t val_len; - struct mlme_vht_capabilities_info vht_cap_info; + struct mlme_vht_capabilities_info *vht_cap_info; - vht_cap_info = mac->mlme_cfg->vht_caps.vht_cap_info; + vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info; if (IS_5G_CH(pe_session->currentOperChannel)) nss = mac->vdev_type_nss_5g.tdls; @@ -741,7 +741,7 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac, pe_debug("HT present: %hu, Chan Width: %hu", htCap->present, htCap->supportedChannelWidthSet); if (((pe_session->currentOperChannel <= SIR_11B_CHANNEL_END) && - mac->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band) || + vht_cap_info->b24ghz_band) || (pe_session->currentOperChannel >= SIR_11B_CHANNEL_END)) { if (IS_DOT11_MODE_VHT(selfDot11Mode) && IS_FEATURE_SUPPORTED_BY_FW(DOT11AC)) { @@ -763,12 +763,12 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac, vhtCap->muBeamformeeCap = 0; vhtCap->muBeamformerCap = 0; - vhtCap->rxMCSMap = vht_cap_info.rx_mcs_map; + vhtCap->rxMCSMap = vht_cap_info->rx_mcs_map; vhtCap->rxHighSupDataRate = - vht_cap_info.rx_supp_data_rate; - vhtCap->txMCSMap = vht_cap_info.tx_mcs_map; - vhtCap->txSupDataRate = vht_cap_info.tx_supp_data_rate; + vht_cap_info->rx_supp_data_rate; + vhtCap->txMCSMap = vht_cap_info->tx_mcs_map; + vhtCap->txSupDataRate = vht_cap_info->tx_supp_data_rate; if (nss == NSS_1x1_MODE) { vhtCap->txMCSMap |= DISABLE_NSS2_MCS; vhtCap->rxMCSMap |= DISABLE_NSS2_MCS; diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index a4f007b3aa..2db97873b9 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -2482,9 +2482,11 @@ uint8_t lim_get_ht_capability(struct mac_context *mac, { uint8_t retVal = 0; uint8_t *ptr; - uint32_t cfgValue; tSirMacTxBFCapabilityInfo macTxBFCapabilityInfo = { 0 }; tSirMacASCapabilityInfo macASCapabilityInfo = { 0 }; + struct mlme_vht_capabilities_info *vht_cap_info; + + vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info; /* */ /* Determine which CFG to read from. Not ALL of the HT */ @@ -2493,19 +2495,13 @@ uint8_t lim_get_ht_capability(struct mac_context *mac, /* */ if (htCap >= eHT_ANTENNA_SELECTION && htCap < eHT_SI_GRANULARITY) { /* Get Antenna Seletion HT Capabilities */ - if (QDF_STATUS_SUCCESS != - wlan_cfg_get_int(mac, WNI_CFG_AS_CAP, &cfgValue)) - cfgValue = 0; ptr = (uint8_t *) &macASCapabilityInfo; - *((uint8_t *) ptr) = (uint8_t) (cfgValue & 0xff); + *((uint8_t *)ptr) = (uint8_t)(vht_cap_info->as_cap & 0xff); } else if (htCap >= eHT_TX_BEAMFORMING && htCap < eHT_ANTENNA_SELECTION) { /* Get Transmit Beam Forming HT Capabilities */ - if (QDF_STATUS_SUCCESS != - wlan_cfg_get_int(mac, WNI_CFG_TX_BF_CAP, &cfgValue)) - cfgValue = 0; ptr = (uint8_t *)&macTxBFCapabilityInfo; - *((uint32_t *)ptr) = (uint32_t)(cfgValue); + *((uint32_t *)ptr) = (uint32_t)(vht_cap_info->tx_bf_cap); } switch (htCap) { diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index 73d9fce5d0..e670b610cb 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -608,8 +608,6 @@ QDF_STATUS populate_dot11f_ht_caps(struct mac_context *mac, struct pe_session *pe_session, tDot11fIEHTCaps *pDot11f) { - uint32_t nCfgValue; - uint8_t nCfgValue8; qdf_size_t ncfglen; QDF_STATUS nSirStatus; uint8_t disable_high_ht_mcs_2x2 = 0; @@ -617,8 +615,10 @@ populate_dot11f_ht_caps(struct mac_context *mac, tSirMacTxBFCapabilityInfo *pTxBFCapabilityInfo; tSirMacASCapabilityInfo *pASCapabilityInfo; struct mlme_ht_capabilities_info *ht_cap_info; + struct mlme_vht_capabilities_info *vht_cap_info; ht_cap_info = &mac->mlme_cfg->ht_caps.ht_cap_info; + vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info; pDot11f->mimoPowerSave = ht_cap_info->mimo_power_save; pDot11f->greenField = ht_cap_info->green_field; @@ -707,9 +707,8 @@ populate_dot11f_ht_caps(struct mac_context *mac, pDot11f->mcsFeedback = mac->mlme_cfg->ht_caps.ext_cap_info.mcs_feedback; - CFG_GET_INT(nSirStatus, mac, WNI_CFG_TX_BF_CAP, nCfgValue); - - pTxBFCapabilityInfo = (tSirMacTxBFCapabilityInfo *) &nCfgValue; + pTxBFCapabilityInfo = + (tSirMacTxBFCapabilityInfo *)&vht_cap_info->tx_bf_cap; pDot11f->txBF = pTxBFCapabilityInfo->txBF; pDot11f->rxStaggeredSounding = pTxBFCapabilityInfo->rxStaggeredSounding; pDot11f->txStaggeredSounding = pTxBFCapabilityInfo->txStaggeredSounding; @@ -732,11 +731,7 @@ populate_dot11f_ht_caps(struct mac_context *mac, pDot11f->compressedSteeringMatrixBFAntennae = pTxBFCapabilityInfo->compressedSteeringMatrixBFAntennae; - CFG_GET_INT(nSirStatus, mac, WNI_CFG_AS_CAP, nCfgValue); - - nCfgValue8 = (uint8_t) nCfgValue; - - pASCapabilityInfo = (tSirMacASCapabilityInfo *) &nCfgValue8; + pASCapabilityInfo = (tSirMacASCapabilityInfo *)&vht_cap_info->as_cap; pDot11f->antennaSelection = pASCapabilityInfo->antennaSelection; pDot11f->explicitCSIFeedbackTx = pASCapabilityInfo->explicitCSIFeedbackTx; @@ -853,20 +848,20 @@ populate_dot11f_vht_caps(struct mac_context *mac, struct pe_session *pe_session, tDot11fIEVHTCaps *pDot11f) { uint32_t nCfgValue = 0; - struct mlme_vht_capabilities_info vht_cap_info; + struct mlme_vht_capabilities_info *vht_cap_info; if (!(mac->mlme_cfg)) { pe_err("invalid mlme cfg"); return QDF_STATUS_E_FAILURE; } - vht_cap_info = mac->mlme_cfg->vht_caps.vht_cap_info; + vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info; pDot11f->present = 1; - nCfgValue = vht_cap_info.ampdu_len; + nCfgValue = vht_cap_info->ampdu_len; pDot11f->maxMPDULen = (nCfgValue & 0x0003); - nCfgValue = vht_cap_info.supp_chan_width; + nCfgValue = vht_cap_info->supp_chan_width; pDot11f->supportedChannelWidthSet = (nCfgValue & 0x0003); nCfgValue = 0; @@ -926,71 +921,71 @@ populate_dot11f_vht_caps(struct mac_context *mac, pDot11f->vhtLinkAdaptCap = pe_session->vht_config.vht_link_adapt; } else { - nCfgValue = vht_cap_info.ldpc_coding_cap; + nCfgValue = vht_cap_info->ldpc_coding_cap; pDot11f->ldpcCodingCap = (nCfgValue & 0x0001); - nCfgValue = vht_cap_info.short_gi_80mhz; + nCfgValue = vht_cap_info->short_gi_80mhz; pDot11f->shortGI80MHz = (nCfgValue & 0x0001); - nCfgValue = vht_cap_info.short_gi_160mhz; + nCfgValue = vht_cap_info->short_gi_160mhz; pDot11f->shortGI160and80plus80MHz = (nCfgValue & 0x0001); - nCfgValue = vht_cap_info.tx_stbc; + nCfgValue = vht_cap_info->tx_stbc; pDot11f->txSTBC = (nCfgValue & 0x0001); - nCfgValue = vht_cap_info.rx_stbc; + nCfgValue = vht_cap_info->rx_stbc; pDot11f->rxSTBC = (nCfgValue & 0x0007); - nCfgValue = vht_cap_info.su_bformee; + nCfgValue = vht_cap_info->su_bformee; pDot11f->suBeamformeeCap = (nCfgValue & 0x0001); - nCfgValue = vht_cap_info.enable_mu_bformee; + nCfgValue = vht_cap_info->enable_mu_bformee; pDot11f->muBeamformeeCap = (nCfgValue & 0x0001); - nCfgValue = vht_cap_info.su_bformer; + nCfgValue = vht_cap_info->su_bformer; pDot11f->suBeamFormerCap = (nCfgValue & 0x0001); - nCfgValue = vht_cap_info.tx_bfee_ant_supp; + nCfgValue = vht_cap_info->tx_bfee_ant_supp; pDot11f->csnofBeamformerAntSup = (nCfgValue & 0x0007); - nCfgValue = vht_cap_info.txop_ps; + nCfgValue = vht_cap_info->txop_ps; pDot11f->vhtTXOPPS = (nCfgValue & 0x0001); - nCfgValue = vht_cap_info.num_soundingdim; + nCfgValue = vht_cap_info->num_soundingdim; pDot11f->numSoundingDim = (nCfgValue & 0x0007); - nCfgValue = vht_cap_info.htc_vhtc; + nCfgValue = vht_cap_info->htc_vhtc; pDot11f->htcVHTCap = (nCfgValue & 0x0001); - pDot11f->rxAntPattern = vht_cap_info.rx_antpattern; + pDot11f->rxAntPattern = vht_cap_info->rx_antpattern; - pDot11f->txAntPattern = vht_cap_info.tx_antpattern; + pDot11f->txAntPattern = vht_cap_info->tx_antpattern; - nCfgValue = vht_cap_info.ampdu_len_exponent; + nCfgValue = vht_cap_info->ampdu_len_exponent; pDot11f->maxAMPDULenExp = (nCfgValue & 0x0007); - nCfgValue = vht_cap_info.link_adap_cap; + nCfgValue = vht_cap_info->link_adap_cap; pDot11f->vhtLinkAdaptCap = (nCfgValue & 0x0003); } - nCfgValue = vht_cap_info.mu_bformer; + nCfgValue = vht_cap_info->mu_bformer; pDot11f->muBeamformerCap = (nCfgValue & 0x0001); pDot11f->reserved1 = 0; - nCfgValue = vht_cap_info.rx_mcs_map; + nCfgValue = vht_cap_info->rx_mcs_map; pDot11f->rxMCSMap = (nCfgValue & 0x0000FFFF); - nCfgValue = vht_cap_info.rx_supp_data_rate; + nCfgValue = vht_cap_info->rx_supp_data_rate; pDot11f->rxHighSupDataRate = (nCfgValue & 0x00001FFF); pDot11f->reserved2 = 0; - nCfgValue = vht_cap_info.tx_mcs_map; + nCfgValue = vht_cap_info->tx_mcs_map; pDot11f->txMCSMap = (nCfgValue & 0x0000FFFF); - nCfgValue = vht_cap_info.tx_supp_data_rate; + nCfgValue = vht_cap_info->tx_supp_data_rate; pDot11f->txSupDataRate = (nCfgValue & 0x00001FFF); pDot11f->reserved3 = 0; @@ -1003,7 +998,7 @@ populate_dot11f_vht_caps(struct mac_context *mac, pDot11f->rxHighSupDataRate = VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1; if (!pe_session->ch_width && - !vht_cap_info.enable_vht20_mcs9 && + !vht_cap_info->enable_vht20_mcs9 && ((pDot11f->txMCSMap & VHT_1x1_MCS_MASK) == VHT_1x1_MCS9_MAP)) { DISABLE_VHT_MCS_9(pDot11f->txMCSMap, @@ -1013,7 +1008,7 @@ populate_dot11f_vht_caps(struct mac_context *mac, } } else { if (!pe_session->ch_width && - !vht_cap_info.enable_vht20_mcs9 && + !vht_cap_info->enable_vht20_mcs9 && ((pDot11f->txMCSMap & VHT_2x2_MCS_MASK) == VHT_2x2_MCS9_MAP)) { DISABLE_VHT_MCS_9(pDot11f->txMCSMap, @@ -5855,8 +5850,7 @@ populate_dot11f_timing_advert_frame(struct mac_context *mac_ctx, if (mac_ctx->mlme_cfg->ht_caps.short_preamble) frame->Capabilities.shortPreamble = 1; - wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED, &val); - if (val) + if (mac_ctx->mlme_cfg->gen.enabled_11h) frame->Capabilities.spectrumMgt = 1; if (mac_ctx->mlme_cfg->wmm_params.qos_enabled) diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 12c2eb4573..0d7813aa67 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1023,8 +1023,6 @@ typedef struct tagCsrConfigParam { uint32_t HeartbeatThresh50; eCsrRoamWmmUserModeType WMMSupportMode; bool Is11eSupportEnabled; - bool Is11dSupportEnabled; - bool Is11hSupportEnabled; bool ProprietaryRatesEnabled; uint8_t AdHocChannel24; uint8_t AdHocChannel5G; diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index c1c24c92e1..31c387ac84 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -386,8 +386,6 @@ struct csr_config { uint32_t HeartbeatThresh24; eCsrRoamWmmUserModeType WMMSupportMode; bool Is11eSupportEnabled; - bool Is11dSupportEnabled; - bool Is11hSupportEnabled; bool ProprietaryRatesEnabled; bool fenableMCCMode; bool mcc_rts_cts_prot_enable; diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index a82bea78a3..540153d079 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -779,7 +779,7 @@ QDF_STATUS sme_init_chan_list(mac_handle_t mac_handle, uint8_t *alpha2, if ((cc_src == SOURCE_USERSPACE) && (pmac->mlme_cfg->sap_cfg.country_code_priority)) { - pmac->roam.configParam.Is11dSupportEnabled = false; + pmac->mlme_cfg->gen.enabled_11d = false; } return csr_init_chan_list(pmac, alpha2); @@ -5973,12 +5973,10 @@ sme_handle_generic_change_country_code(struct mac_context *mac_ctx, if (SOURCE_11D != mac_ctx->reg_hint_src) { if (SOURCE_DRIVER != mac_ctx->reg_hint_src) { if (user_ctry_priority) - mac_ctx->roam.configParam.Is11dSupportEnabled = - false; + mac_ctx->mlme_cfg->gen.enabled_11d = false; else { - if (mac_ctx->roam.configParam. - Is11dSupportEnabled && - mac_ctx->scan.countryCode11d[0] != 0) { + if (mac_ctx->mlme_cfg->gen.enabled_11d && + mac_ctx->scan.countryCode11d[0] != 0) { sme_debug("restore 11d"); @@ -12592,14 +12590,14 @@ QDF_STATUS sme_update_nss(mac_handle_t mac_handle, uint8_t nss) uint32_t i; struct mlme_ht_capabilities_info *ht_cap_info; struct csr_roam_session *csr_session; - struct mlme_vht_capabilities_info vht_cap_info; + struct mlme_vht_capabilities_info *vht_cap_info; - vht_cap_info = mac_ctx->mlme_cfg->vht_caps.vht_cap_info; + vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info; status = sme_acquire_global_lock(&mac_ctx->sme); if (QDF_STATUS_SUCCESS == status) { - vht_cap_info.enable2x2 = (nss == 1) ? 0 : 1; + vht_cap_info->enable2x2 = (nss == 1) ? 0 : 1; /* get the HT capability info*/ ht_cap_info = &mac_ctx->mlme_cfg->ht_caps.ht_cap_info; @@ -12646,15 +12644,16 @@ int sme_update_tx_bfee_nsts(mac_handle_t mac_handle, uint8_t session_id, { struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle); uint8_t nsts_set_val; + struct mlme_vht_capabilities_info *vht_cap_info; + vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info; mac_ctx->usr_cfg_tx_bfee_nsts = usr_cfg_val; if (usr_cfg_val) nsts_set_val = usr_cfg_val; else nsts_set_val = nsts_val; - mac_ctx->mlme_cfg->vht_caps.vht_cap_info.tx_bfee_ant_supp = - nsts_set_val; + vht_cap_info->tx_bfee_ant_supp = nsts_set_val; if (usr_cfg_val) sme_set_he_tx_bf_cbf_rates(session_id); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index cb7e590486..4d66e4492c 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -1308,12 +1308,6 @@ void csr_set_global_cfgs(struct mac_context *mac) { wlan_mlme_set_frag_threshold(mac->psoc, csr_get_frag_thresh(mac)); wlan_mlme_set_rts_threshold(mac->psoc, csr_get_rts_thresh(mac)); - cfg_set_int(mac, WNI_CFG_11D_ENABLED, - ((mac->roam.configParam.Is11hSupportEnabled) ? - mac->roam.configParam.Is11dSupportEnabled : - mac->roam.configParam.Is11dSupportEnabled)); - cfg_set_int(mac, WNI_CFG_11H_ENABLED, - mac->roam.configParam.Is11hSupportEnabled); /* For now we will just use the 5GHz CB mode ini parameter to decide * whether CB supported or not in Probes when there is no session * Once session is established we will use the session related params @@ -1667,9 +1661,9 @@ static void init_config_param(struct mac_context *mac) mac->roam.configParam.uCfgDot11Mode = eCSR_CFG_DOT11_MODE_AUTO; mac->roam.configParam.HeartbeatThresh24 = 40; mac->roam.configParam.HeartbeatThresh50 = 40; - mac->roam.configParam.Is11dSupportEnabled = false; + mac->mlme_cfg->gen.enabled_11d = false; mac->roam.configParam.Is11eSupportEnabled = true; - mac->roam.configParam.Is11hSupportEnabled = true; + mac->mlme_cfg->gen.enabled_11h = true; mac->roam.configParam.WMMSupportMode = eCsrRoamWmmAuto; mac->roam.configParam.ProprietaryRatesEnabled = true; for (i = 0; i < CSR_NUM_RSSI_CAT; i++) @@ -2495,14 +2489,6 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac, (pParam->WMMSupportMode == eCsrRoamWmmNoQos) ? 0 : 1; mac->roam.configParam.Is11eSupportEnabled = pParam->Is11eSupportEnabled; - mac->roam.configParam.Is11dSupportEnabled = - pParam->Is11dSupportEnabled; - - if (mac->mlme_cfg->gen.band_capability == BAND_2G) - mac->roam.configParam.Is11hSupportEnabled = 0; - else - mac->roam.configParam.Is11hSupportEnabled = - pParam->Is11hSupportEnabled; mac->roam.configParam.fenableMCCMode = pParam->fEnableMCCMode; mac->roam.configParam.mcc_rts_cts_prot_enable = @@ -2812,8 +2798,6 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, tCsrConfigParam *pParam pParam->is_force_1x1 = cfg_params->is_force_1x1; pParam->WMMSupportMode = cfg_params->WMMSupportMode; pParam->Is11eSupportEnabled = cfg_params->Is11eSupportEnabled; - pParam->Is11dSupportEnabled = cfg_params->Is11dSupportEnabled; - pParam->Is11hSupportEnabled = cfg_params->Is11hSupportEnabled; pParam->channelBondingMode24GHz = csr_convert_phy_cb_state_to_ini_value( cfg_params->channelBondingMode24GHz); pParam->channelBondingMode5GHz = csr_convert_phy_cb_state_to_ini_value( @@ -4184,7 +4168,7 @@ QDF_STATUS csr_roam_prepare_bss_config(struct mac_context *mac, pBssConfig->f11hSupport = false; else pBssConfig->f11hSupport = - mac->roam.configParam.Is11hSupportEnabled; + mac->mlme_cfg->gen.enabled_11h; /* power constraint */ pBssConfig->uPowerLimit = csr_get11h_power_constraint(mac, &pIes->PowerConstraints); @@ -4934,9 +4918,11 @@ QDF_STATUS csr_roam_set_bss_config_cfg(struct mac_context *mac, uint32_t session mac->mlme_cfg->feature_flags.enable_short_slot_time_11g = pBssConfig->uShortSlotTime; /* 11d */ - cfg_set_int(mac, WNI_CFG_11D_ENABLED, - ((pBssConfig->f11hSupport) ? pBssConfig->f11hSupport : - pProfile->ieee80211d)); + if (pBssConfig->f11hSupport) + mac->mlme_cfg->gen.enabled_11d = pBssConfig->f11hSupport; + else + mac->mlme_cfg->gen.enabled_11d = pProfile->ieee80211d; + cfg_set_int(mac, WNI_CFG_LOCAL_POWER_CONSTRAINT, pBssConfig->uPowerLimit); /* CB */ @@ -16658,13 +16644,13 @@ QDF_STATUS csr_roam_open_session(struct mac_context *mac_ctx, uint32_t existing_session_id; struct mlme_ht_capabilities_info *ht_cap_info; struct csr_roam_session *session; - struct mlme_vht_capabilities_info vht_cap_info; + struct mlme_vht_capabilities_info *vht_cap_info; if (!(mac_ctx->mlme_cfg)) { pe_err("invalid mlme cfg"); return QDF_STATUS_E_FAILURE; } - vht_cap_info = mac_ctx->mlme_cfg->vht_caps.vht_cap_info; + vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info; /* check to see if the mac address already belongs to a session */ status = csr_roam_get_session_id_from_bssid(mac_ctx, @@ -16740,28 +16726,29 @@ QDF_STATUS csr_roam_open_session(struct mac_context *mac_ctx, } #endif /* FEATURE_WLAN_BTAMP_UT_RF */ - session->vht_config.max_mpdu_len = vht_cap_info.ampdu_len; + session->vht_config.max_mpdu_len = vht_cap_info->ampdu_len; session->vht_config.supported_channel_widthset = - vht_cap_info.supp_chan_width; - session->vht_config.ldpc_coding = vht_cap_info.ldpc_coding_cap; - session->vht_config.shortgi80 = vht_cap_info.short_gi_80mhz; + vht_cap_info->supp_chan_width; + session->vht_config.ldpc_coding = vht_cap_info->ldpc_coding_cap; + session->vht_config.shortgi80 = vht_cap_info->short_gi_80mhz; session->vht_config.shortgi160and80plus80 = - vht_cap_info.short_gi_160mhz; - session->vht_config.tx_stbc = vht_cap_info.tx_stbc; - session->vht_config.rx_stbc = vht_cap_info.rx_stbc; - session->vht_config.su_beam_former = vht_cap_info.su_bformer; - session->vht_config.su_beam_formee = vht_cap_info.su_bformee; + vht_cap_info->short_gi_160mhz; + session->vht_config.tx_stbc = vht_cap_info->tx_stbc; + session->vht_config.rx_stbc = vht_cap_info->rx_stbc; + session->vht_config.su_beam_former = vht_cap_info->su_bformer; + session->vht_config.su_beam_formee = vht_cap_info->su_bformee; session->vht_config.csnof_beamformer_antSup = - vht_cap_info.tx_bfee_ant_supp; - session->vht_config.num_soundingdim = vht_cap_info.num_soundingdim; - session->vht_config.mu_beam_former = vht_cap_info.mu_bformer; - session->vht_config.mu_beam_formee = vht_cap_info.enable_mu_bformee; - session->vht_config.vht_txops = vht_cap_info.txop_ps; - session->vht_config.htc_vhtcap = vht_cap_info.htc_vhtc; - session->vht_config.rx_antpattern = vht_cap_info.rx_antpattern; - session->vht_config.tx_antpattern = vht_cap_info.tx_antpattern; + vht_cap_info->tx_bfee_ant_supp; + session->vht_config.num_soundingdim = vht_cap_info->num_soundingdim; + session->vht_config.mu_beam_former = vht_cap_info->mu_bformer; + session->vht_config.mu_beam_formee = vht_cap_info->enable_mu_bformee; + session->vht_config.vht_txops = vht_cap_info->txop_ps; + session->vht_config.htc_vhtcap = vht_cap_info->htc_vhtc; + session->vht_config.rx_antpattern = vht_cap_info->rx_antpattern; + session->vht_config.tx_antpattern = vht_cap_info->tx_antpattern; - session->vht_config.max_ampdu_lenexp = vht_cap_info.ampdu_len_exponent; + session->vht_config.max_ampdu_lenexp = + vht_cap_info->ampdu_len_exponent; csr_update_session_he_cap(mac_ctx, session); @@ -18762,7 +18749,7 @@ static void csr_update_driver_assoc_ies(struct mac_context *mac_ctx, else power_cap_ie_data[1] = MAX_TX_PWR_CAP; - wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED, &csr_11henable); + csr_11henable = mac_ctx->mlme_cfg->gen.enabled_11h; if (csr_11henable && csr_is11h_supported(mac_ctx)) { /* Append power cap IE */ diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index 6fc0c47e9b..5c9f23ba22 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -724,7 +724,7 @@ static void csr_diag_reset_country_information(struct mac_context *mac) mac->roam.configParam.nTxPowerCap); } } - if (!mac->roam.configParam.Is11dSupportEnabled) + if (!mac->mlme_cfg->gen.enabled_11d) p11dLog->supportMultipleDomain = WLAN_80211D_DISABLED; else p11dLog->supportMultipleDomain = @@ -834,7 +834,7 @@ static void csr_diag_apply_country_info(struct mac_context *mac_ctx) } } diag_end: - if (!mac_ctx->roam.configParam.Is11dSupportEnabled) + if (!mac_ctx->mlme_cfg->gen.enabled_11d) p11dLog->supportMultipleDomain = WLAN_80211D_DISABLED; else p11dLog->supportMultipleDomain = diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 6ab7a18bc6..99328aaf14 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -1447,12 +1447,12 @@ bool csr_is_privacy(tSirBssDescription *pSirBssDesc) bool csr_is11d_supported(struct mac_context *mac) { - return mac->roam.configParam.Is11dSupportEnabled; + return mac->mlme_cfg->gen.enabled_11d; } bool csr_is11h_supported(struct mac_context *mac) { - return mac->roam.configParam.Is11hSupportEnabled; + return mac->mlme_cfg->gen.enabled_11h; } bool csr_is11e_supported(struct mac_context *mac) @@ -2229,10 +2229,9 @@ uint32_t csr_get11h_power_constraint(struct mac_context *mac_ctx, /* check if .11h support is enabled, if not, * the power constraint is 0. */ - if (mac_ctx->roam.configParam.Is11hSupportEnabled && - constraints->present) { + if (mac_ctx->mlme_cfg->gen.enabled_11h && + constraints->present) localPowerConstraint = constraints->localPowerConstraints; - } return localPowerConstraint; } diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 25102b743e..7dc4c940c3 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -2651,7 +2651,6 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, struct mac_context *mac = NULL; tSirMacCapabilityInfo selfCaps; uint32_t val = 0; - uint32_t nCfgValue; uint16_t *pCfgValue16; uint8_t nCfgValue8, *pCfgValue8; tSirMacQosInfoStation macQosInfoSta; @@ -2682,13 +2681,8 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, if (mac->mlme_cfg->feature_flags.enable_short_slot_time_11g) selfCaps.shortSlotTime = 1; - if (wlan_cfg_get_int(mac, WNI_CFG_11H_ENABLED, &val) != - QDF_STATUS_SUCCESS) { - QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, - "Failed to get WNI_CFG_11H_ENABLED"); - return QDF_STATUS_E_FAILURE; - } - if (val) + + if (mac->mlme_cfg->gen.enabled_11h) selfCaps.spectrumMgt = 1; if (mac->mlme_cfg->wmm_params.qos_enabled) @@ -2743,23 +2737,11 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, return QDF_STATUS_E_FAILURE; } - if (wlan_cfg_get_int(mac, WNI_CFG_TX_BF_CAP, &nCfgValue) != - QDF_STATUS_SUCCESS) { - QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, - "Failed to get WNI_CFG_TX_BF_CAP"); - return QDF_STATUS_E_FAILURE; - } /* tSirMacTxBFCapabilityInfo */ - nCfgValue8 = (uint8_t) nCfgValue; + nCfgValue8 = (uint8_t)mac->mlme_cfg->vht_caps.vht_cap_info.tx_bf_cap; roam_offload_params->ht_txbf = nCfgValue8 & 0xFF; - if (wlan_cfg_get_int(mac, WNI_CFG_AS_CAP, &nCfgValue) != - QDF_STATUS_SUCCESS) { - QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, - "Failed to get WNI_CFG_AS_CAP"); - return QDF_STATUS_E_FAILURE; - } /* tSirMacASCapabilityInfo */ - nCfgValue8 = (uint8_t) nCfgValue; + nCfgValue8 = (uint8_t)mac->mlme_cfg->vht_caps.vht_cap_info.as_cap; roam_offload_params->asel_cap = nCfgValue8 & 0xFF; /* QOS Info */