diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 314479137524..1e630d55d748 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -1246,6 +1246,23 @@ static void mlme_init_wmm_in_cfg(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_QOS_WMM_UAPSD_VO_SUS_INTV); } +static void mlme_init_wps_params_cfg(struct wlan_objmgr_psoc *psoc, + struct wlan_mlme_wps_params *wps_params) +{ + wps_params->enable_wps = cfg_default(CFG_WPS_ENABLE); + wps_params->wps_cfg_method = cfg_default(CFG_WPS_CFG_METHOD); + wps_params->wps_device_password_id = + cfg_default(CFG_WPS_DEVICE_PASSWORD_ID); + wps_params->wps_device_sub_category = + cfg_default(CFG_WPS_DEVICE_SUB_CATEGORY); + wps_params->wps_primary_device_category = + cfg_default(CFG_WPS_PRIMARY_DEVICE_CATEGORY); + wps_params->wps_primary_device_oui = + cfg_default(CFG_WPS_PIMARY_DEVICE_OUI); + wps_params->wps_state = cfg_default(CFG_WPS_STATE); + wps_params->wps_version = cfg_default(CFG_WPS_VERSION); +} + QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc) { struct wlan_mlme_psoc_obj *mlme_obj; @@ -1282,6 +1299,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc) mlme_init_threshold_cfg(psoc, &mlme_cfg->threshold); mlme_init_oce_cfg(psoc, &mlme_cfg->oce); mlme_init_wep_cfg(&mlme_cfg->wep_params); + mlme_init_wps_params_cfg(psoc, &mlme_cfg->wps_params); return status; } diff --git a/components/mlme/dispatcher/inc/cfg_mlme.h b/components/mlme/dispatcher/inc/cfg_mlme.h index 2bcb0e029112..e8becb91c7a6 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme.h +++ b/components/mlme/dispatcher/inc/cfg_mlme.h @@ -22,7 +22,7 @@ #include "cfg_define.h" #include "cfg_converged.h" #include "qdf_types.h" - +#include "cfg_mlme_wps_params.h" #include "cfg_mlme_chainmask.h" #include "cfg_mlme_edca_params.h" #include "cfg_mlme_generic.h" @@ -73,6 +73,7 @@ CFG_THRESHOLD_ALL \ CFG_TIMEOUT_ALL \ CFG_VHT_CAPS_ALL \ - CFG_WEP_PARAMS_ALL + CFG_WEP_PARAMS_ALL \ + CFG_WPS_ALL #endif /* __CFG_MLME_H */ diff --git a/components/mlme/dispatcher/inc/cfg_mlme_wps_params.h b/components/mlme/dispatcher/inc/cfg_mlme_wps_params.h new file mode 100644 index 000000000000..66fa6efb4fe7 --- /dev/null +++ b/components/mlme/dispatcher/inc/cfg_mlme_wps_params.h @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2012-2018 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 + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * DOC: This file contains centralized definitions of converged configuration. + */ + +#ifndef __CFG_MLME_WPS_PARAMS_H +#define __CFG_MLME_WPS_PARAMS_H + +#define CFG_WPS_ENABLE CFG_UINT( \ + "enable_wps", \ + 0, \ + 255, \ + 0, \ + CFG_VALUE_OR_DEFAULT, \ + "enable wps") + +#define CFG_WPS_STATE CFG_UINT( \ + "wps_state", \ + 0, \ + 255, \ + 1, \ + CFG_VALUE_OR_DEFAULT, \ + "wps_state") + +#define CFG_WPS_VERSION CFG_UINT( \ + "wps_version", \ + 0, \ + 255, \ + 16, \ + CFG_VALUE_OR_DEFAULT, \ + "wps version") + +#define CFG_WPS_CFG_METHOD CFG_UINT( \ + "wps_cfg_method", \ + 0, \ + 4294967295, \ + 8, \ + CFG_VALUE_OR_DEFAULT, \ + "wps cfg method") + +#define CFG_WPS_PRIMARY_DEVICE_CATEGORY CFG_UINT( \ + "wps_primary_device_category", \ + 0, \ + 65535, \ + 1, \ + CFG_VALUE_OR_DEFAULT, \ + "wps primary device category") + +#define CFG_WPS_PIMARY_DEVICE_OUI CFG_UINT( \ + "wps_primary_device_oui", \ + 0, \ + 4294967295, \ + 5304836, \ + CFG_VALUE_OR_DEFAULT, \ + "wps primary device oui") + +#define CFG_WPS_DEVICE_SUB_CATEGORY CFG_UINT( \ + "wps_device_sub_category", \ + 0, \ + 65535, \ + 1, \ + CFG_VALUE_OR_DEFAULT, \ + "wps device sub category") + +#define CFG_WPS_DEVICE_PASSWORD_ID CFG_UINT( \ + "wps_device_password_id", \ + 0, \ + 4294967295, \ + 0, \ + CFG_VALUE_OR_DEFAULT, \ + "wps device password id") + +#define CFG_WPS_ALL \ + CFG(CFG_WPS_ENABLE) \ + CFG(CFG_WPS_STATE) \ + CFG(CFG_WPS_VERSION) \ + CFG(CFG_WPS_CFG_METHOD) \ + CFG(CFG_WPS_PRIMARY_DEVICE_CATEGORY) \ + CFG(CFG_WPS_PIMARY_DEVICE_OUI) \ + CFG(CFG_WPS_DEVICE_SUB_CATEGORY) \ + CFG(CFG_WPS_DEVICE_PASSWORD_ID) + +#endif /* __CFG_MLME_WPS_PARAMS_H */ + diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 109003922a01..c71624e78fbf 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -309,6 +309,29 @@ struct wlan_mlme_ht_caps { struct mlme_ht_capabilities_info ht_cap_info; }; +/* + * struct wlan_mlme_wps_params - All wps based related cfg items + * + * @enable_wps - to enable wps + * @wps_state - current wps state + * @wps_version - wps version + * @wps_cfg_method - wps config method + * @wps_primary_device_category - wps primary device category + * @wps_primary_device_oui - primary device OUI + * @wps_device_sub_category - device sub category + * @wps_device_password_id - password id of device + */ +struct wlan_mlme_wps_params { + uint8_t enable_wps; + uint8_t wps_state; + uint8_t wps_version; + uint32_t wps_cfg_method; + uint32_t wps_primary_device_category; + uint32_t wps_primary_device_oui; + uint16_t wps_device_sub_category; + uint32_t wps_device_password_id; +}; + /** * struct wlan_mlme_ - HT Capabilities related config items * @ht_cap_info: HT capabilities Info Structure @@ -1213,6 +1236,7 @@ struct wlan_mlme_wep_cfg { * @feature_flags: Feature flag config items * @wep_params: WEP related config items * @wmm_params: WMM related CFG & INI Items + * @wps_params: WPS related CFG itmes */ struct wlan_mlme_cfg { struct wlan_mlme_chainmask chainmask_cfg; @@ -1239,6 +1263,7 @@ struct wlan_mlme_cfg { struct wlan_mlme_feature_flag feature_flags; struct wlan_mlme_wep_cfg wep_params; struct wlan_mlme_wmm_params wmm_params; + struct wlan_mlme_wps_params wps_params; }; #endif diff --git a/core/mac/inc/wni_cfg.h b/core/mac/inc/wni_cfg.h index 5542cbc5e3ba..3b2dcbfc156d 100644 --- a/core/mac/inc/wni_cfg.h +++ b/core/mac/inc/wni_cfg.h @@ -64,15 +64,7 @@ enum { WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE, WNI_CFG_WOWLAN_CHANNEL_SWITCH_ENABLE, WNI_CFG_IBSS_AUTO_BSSID, - WNI_CFG_WPS_ENABLE, - WNI_CFG_WPS_STATE, - WNI_CFG_WPS_VERSION, - WNI_CFG_WPS_CFG_METHOD, WNI_CFG_WPS_UUID, - WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY, - WNI_CFG_WPS_PIMARY_DEVICE_OUI, - WNI_CFG_WPS_DEVICE_SUB_CATEGORY, - WNI_CFG_WPS_DEVICE_PASSWORD_ID, WNI_CFG_TELE_BCN_WAKEUP_EN, WNI_CFG_TELE_BCN_MAX_LI, WNI_CFG_ASSOC_STA_LIMIT, @@ -784,40 +776,7 @@ enum { #define WNI_CFG_IBSS_AUTO_BSSID_STAMAX 1 #define WNI_CFG_IBSS_AUTO_BSSID_STADEF 1 -#define WNI_CFG_WPS_ENABLE_STAMIN 0 -#define WNI_CFG_WPS_ENABLE_STAMAX 255 -#define WNI_CFG_WPS_ENABLE_STADEF 0 - #define WNI_CFG_WPS_ENABLE_AP 1 -#define WNI_CFG_WPS_ENABLE_STA 2 - -#define WNI_CFG_WPS_STATE_STAMIN 0 -#define WNI_CFG_WPS_STATE_STAMAX 255 -#define WNI_CFG_WPS_STATE_STADEF 1 - -#define WNI_CFG_WPS_VERSION_STAMIN 0 -#define WNI_CFG_WPS_VERSION_STAMAX 255 -#define WNI_CFG_WPS_VERSION_STADEF 16 - -#define WNI_CFG_WPS_CFG_METHOD_STAMIN 0 -#define WNI_CFG_WPS_CFG_METHOD_STAMAX 4294967295 -#define WNI_CFG_WPS_CFG_METHOD_STADEF 8 - -#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY_STAMIN 0 -#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY_STAMAX 65535 -#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY_STADEF 1 - -#define WNI_CFG_WPS_PIMARY_DEVICE_OUI_STAMIN 0 -#define WNI_CFG_WPS_PIMARY_DEVICE_OUI_STAMAX 4294967295 -#define WNI_CFG_WPS_PIMARY_DEVICE_OUI_STADEF 5304836 - -#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY_STAMIN 0 -#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY_STAMAX 65535 -#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY_STADEF 1 - -#define WNI_CFG_WPS_DEVICE_PASSWORD_ID_STAMIN 0 -#define WNI_CFG_WPS_DEVICE_PASSWORD_ID_STAMAX 4294967295 -#define WNI_CFG_WPS_DEVICE_PASSWORD_ID_STADEF 0 #define WNI_CFG_TELE_BCN_WAKEUP_EN_STAMIN 0 #define WNI_CFG_TELE_BCN_WAKEUP_EN_STAMAX 1 diff --git a/core/mac/src/cfg/cfg_param_name.c b/core/mac/src/cfg/cfg_param_name.c index 7372a0bcd8e0..5ebc486bdf11 100644 --- a/core/mac/src/cfg/cfg_param_name.c +++ b/core/mac/src/cfg/cfg_param_name.c @@ -78,15 +78,7 @@ const char *cfg_get_string(uint16_t cfg_id) CASE_RETURN_STRING(WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE); CASE_RETURN_STRING(WNI_CFG_WOWLAN_CHANNEL_SWITCH_ENABLE); CASE_RETURN_STRING(WNI_CFG_IBSS_AUTO_BSSID); - CASE_RETURN_STRING(WNI_CFG_WPS_ENABLE); - CASE_RETURN_STRING(WNI_CFG_WPS_STATE); - CASE_RETURN_STRING(WNI_CFG_WPS_VERSION); - CASE_RETURN_STRING(WNI_CFG_WPS_CFG_METHOD); CASE_RETURN_STRING(WNI_CFG_WPS_UUID); - CASE_RETURN_STRING(WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY); - CASE_RETURN_STRING(WNI_CFG_WPS_PIMARY_DEVICE_OUI); - CASE_RETURN_STRING(WNI_CFG_WPS_DEVICE_SUB_CATEGORY); - CASE_RETURN_STRING(WNI_CFG_WPS_DEVICE_PASSWORD_ID); CASE_RETURN_STRING(WNI_CFG_TELE_BCN_WAKEUP_EN); CASE_RETURN_STRING(WNI_CFG_TELE_BCN_MAX_LI); CASE_RETURN_STRING(WNI_CFG_ASSOC_STA_LIMIT); diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c index 607e6204ecdd..8b76d3b79c7c 100644 --- a/core/mac/src/cfg/cfg_proc_msg.c +++ b/core/mac/src/cfg/cfg_proc_msg.c @@ -236,57 +236,9 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = { WNI_CFG_IBSS_AUTO_BSSID_STAMIN, WNI_CFG_IBSS_AUTO_BSSID_STAMAX, WNI_CFG_IBSS_AUTO_BSSID_STADEF}, - {WNI_CFG_WPS_ENABLE, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | - CFG_CTL_NTF_LIM, - WNI_CFG_WPS_ENABLE_STAMIN, - WNI_CFG_WPS_ENABLE_STAMAX, - WNI_CFG_WPS_ENABLE_STADEF}, - {WNI_CFG_WPS_STATE, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | - CFG_CTL_NTF_LIM, - WNI_CFG_WPS_STATE_STAMIN, - WNI_CFG_WPS_STATE_STAMAX, - WNI_CFG_WPS_STATE_STADEF}, - {WNI_CFG_WPS_VERSION, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | - CFG_CTL_NTF_LIM, - WNI_CFG_WPS_VERSION_STAMIN, - WNI_CFG_WPS_VERSION_STAMAX, - WNI_CFG_WPS_VERSION_STADEF}, - {WNI_CFG_WPS_CFG_METHOD, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | - CFG_CTL_NTF_LIM, - WNI_CFG_WPS_CFG_METHOD_STAMIN, - 4294967295u, - WNI_CFG_WPS_CFG_METHOD_STADEF}, {WNI_CFG_WPS_UUID, CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_NTF_LIM, 0, 0, 0}, - {WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | - CFG_CTL_NTF_LIM, - WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY_STAMIN, - WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY_STAMAX, - WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY_STADEF}, - {WNI_CFG_WPS_PIMARY_DEVICE_OUI, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | - CFG_CTL_NTF_LIM, - WNI_CFG_WPS_PIMARY_DEVICE_OUI_STAMIN, - 4294967295u, - WNI_CFG_WPS_PIMARY_DEVICE_OUI_STADEF}, - {WNI_CFG_WPS_DEVICE_SUB_CATEGORY, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | - CFG_CTL_NTF_LIM, - WNI_CFG_WPS_DEVICE_SUB_CATEGORY_STAMIN, - WNI_CFG_WPS_DEVICE_SUB_CATEGORY_STAMAX, - WNI_CFG_WPS_DEVICE_SUB_CATEGORY_STADEF}, - {WNI_CFG_WPS_DEVICE_PASSWORD_ID, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | - CFG_CTL_NTF_LIM, - WNI_CFG_WPS_DEVICE_PASSWORD_ID_STAMIN, - 4294967295u, - WNI_CFG_WPS_DEVICE_PASSWORD_ID_STADEF}, {WNI_CFG_TELE_BCN_WAKEUP_EN, CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT, WNI_CFG_TELE_BCN_WAKEUP_EN_STAMIN, diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 5e8ce36779c2..481d8296775f 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -545,7 +545,7 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, uint32_t addn_ie_present = false; uint16_t addn_ie_len = 0; - uint32_t wps_ap = 0, tmp; + bool wps_ap = 0; uint8_t tx_flag = 0; uint8_t *add_ie = NULL; const uint8_t *p2p_ie = NULL; @@ -615,12 +615,8 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, &frm->WscProbeRes, pe_session); } else { - if (wlan_cfg_get_int(mac_ctx, (uint16_t) WNI_CFG_WPS_ENABLE, - &tmp) != QDF_STATUS_SUCCESS) - pe_err("Failed to cfg get id %d", WNI_CFG_WPS_ENABLE); - - wps_ap = tmp & WNI_CFG_WPS_ENABLE_AP; - + wps_ap = mac_ctx->mlme_cfg->wps_params.enable_wps & + WNI_CFG_WPS_ENABLE_AP; if (wps_ap) populate_dot11f_wsc_in_probe_res(mac_ctx, &frm->WscProbeRes); diff --git a/core/mac/src/pe/sch/sch_beacon_gen.c b/core/mac/src/pe/sch/sch_beacon_gen.c index 46106ad7fe6c..f54a1bd1942b 100644 --- a/core/mac/src/pe/sch/sch_beacon_gen.c +++ b/core/mac/src/pe/sch/sch_beacon_gen.c @@ -232,7 +232,7 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) tDot11fBeacon1 *bcn_1; tDot11fBeacon2 *bcn_2; uint32_t i, n_status, n_bytes; - uint32_t wps_ap_enable = 0, tmp; + bool wps_ap_enable = 0; tDot11fIEWscProbeRes *wsc_prb_res; uint8_t *extra_ie = NULL; uint32_t extra_ie_len = 0; @@ -489,12 +489,8 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) &bcn_2->WscBeacon, session); } } else { - status = wlan_cfg_get_int(mac_ctx, WNI_CFG_WPS_ENABLE, &tmp); - if (QDF_IS_STATUS_ERROR(status)) - pe_err("Failed to cfg get id %d", WNI_CFG_WPS_ENABLE); - - wps_ap_enable = tmp & WNI_CFG_WPS_ENABLE_AP; - + wps_ap_enable = mac_ctx->mlme_cfg->wps_params.enable_wps & + WNI_CFG_WPS_ENABLE_AP; if (wps_ap_enable) populate_dot11f_wsc(mac_ctx, &bcn_2->WscBeacon); 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 5c6dd345eb0d..8ca820d3f819 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 @@ -5163,9 +5163,7 @@ QDF_STATUS populate_dot11f_wsc(tpAniSirGlobal pMac, pDot11f->Version.major = 0x01; pDot11f->Version.minor = 0x00; - if (wlan_cfg_get_int(pMac, (uint16_t) WNI_CFG_WPS_STATE, &wpsState) != - QDF_STATUS_SUCCESS) - pe_err("Failed to cfg get id %d", WNI_CFG_WPS_STATE); + wpsState = pMac->mlme_cfg->wps_params.wps_state; pDot11f->WPSState.present = 1; pDot11f->WPSState.state = (uint8_t) wpsState; @@ -5190,7 +5188,6 @@ QDF_STATUS populate_dot11f_wsc_registrar_info(tpAniSirGlobal pMac, tDot11fIEWscBeacon *pDot11f) { const struct sLimWscIeInfo *const pWscIeInfo = &(pMac->lim.wscIeInfo); - uint32_t devicepasswdId; pDot11f->APSetupLocked.present = 1; pDot11f->APSetupLocked.fLocked = pWscIeInfo->apSetupLocked; @@ -5198,14 +5195,9 @@ QDF_STATUS populate_dot11f_wsc_registrar_info(tpAniSirGlobal pMac, pDot11f->SelectedRegistrar.present = 1; pDot11f->SelectedRegistrar.selected = pWscIeInfo->selectedRegistrar; - if (wlan_cfg_get_int - (pMac, (uint16_t) WNI_CFG_WPS_DEVICE_PASSWORD_ID, - &devicepasswdId) != QDF_STATUS_SUCCESS) - pe_err("Failed to cfg get id %d", - WNI_CFG_WPS_DEVICE_PASSWORD_ID); - pDot11f->DevicePasswordID.present = 1; - pDot11f->DevicePasswordID.id = (uint16_t) devicepasswdId; + pDot11f->DevicePasswordID.id = + (uint16_t)pMac->mlme_cfg->wps_params.wps_device_password_id; pDot11f->SelectedRegistrarConfigMethods.present = 1; pDot11f->SelectedRegistrarConfigMethods.methods = @@ -5493,23 +5485,17 @@ QDF_STATUS populate_dot11f_beacon_wpsi_es(tpAniSirGlobal pMac, QDF_STATUS populate_dot11f_wsc_in_probe_res(tpAniSirGlobal pMac, tDot11fIEWscProbeRes *pDot11f) { - uint32_t cfgMethods; uint32_t cfgStrLen; uint32_t val; uint32_t wpsVersion, wpsState; - if (wlan_cfg_get_int(pMac, (uint16_t) WNI_CFG_WPS_VERSION, &wpsVersion) != - QDF_STATUS_SUCCESS) - pe_err("Failed to cfg get id %d", WNI_CFG_WPS_VERSION); + wpsVersion = pMac->mlme_cfg->wps_params.wps_version; pDot11f->Version.present = 1; pDot11f->Version.major = (uint8_t) ((wpsVersion & 0xF0) >> 4); pDot11f->Version.minor = (uint8_t) (wpsVersion & 0x0F); - if (wlan_cfg_get_int(pMac, (uint16_t) WNI_CFG_WPS_STATE, &wpsState) != - QDF_STATUS_SUCCESS) - pe_err("Failed to cfg get id %d", WNI_CFG_WPS_STATE); - + wpsState = pMac->mlme_cfg->wps_params.wps_state; pDot11f->WPSState.present = 1; pDot11f->WPSState.state = (uint8_t) wpsState; @@ -5585,16 +5571,10 @@ QDF_STATUS populate_dot11f_wsc_in_probe_res(tpAniSirGlobal pMac, pDot11f->PrimaryDeviceType.present = 1; - if (wlan_cfg_get_int(pMac, WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY, &val) != - QDF_STATUS_SUCCESS) { - pe_err("cfg get prim device category failed"); - } else - pDot11f->PrimaryDeviceType.primary_category = (uint16_t) val; + pDot11f->PrimaryDeviceType.primary_category = + (uint16_t)pMac->mlme_cfg->wps_params.wps_primary_device_category; - if (wlan_cfg_get_int(pMac, WNI_CFG_WPS_PIMARY_DEVICE_OUI, &val) != - QDF_STATUS_SUCCESS) { - pe_err("cfg get prim device OUI failed"); - } else { + val = pMac->mlme_cfg->wps_params.wps_primary_device_oui; *(pDot11f->PrimaryDeviceType.oui) = (uint8_t) ((val >> 24) & 0xff); *(pDot11f->PrimaryDeviceType.oui + 1) = @@ -5603,13 +5583,10 @@ QDF_STATUS populate_dot11f_wsc_in_probe_res(tpAniSirGlobal pMac, (uint8_t) ((val >> 8) & 0xff); *(pDot11f->PrimaryDeviceType.oui + 3) = (uint8_t) ((val & 0xff)); - } - if (wlan_cfg_get_int(pMac, WNI_CFG_WPS_DEVICE_SUB_CATEGORY, &val) != - QDF_STATUS_SUCCESS) { - pe_err("cfg get prim device sub category failed"); - } else - pDot11f->PrimaryDeviceType.sub_category = (uint16_t) val; + pDot11f->PrimaryDeviceType.sub_category = + (uint16_t)pMac->mlme_cfg->wps_params.wps_device_sub_category; + pDot11f->DeviceName.present = 1; cfgStrLen = sizeof(pDot11f->DeviceName.text); @@ -5623,16 +5600,10 @@ QDF_STATUS populate_dot11f_wsc_in_probe_res(tpAniSirGlobal pMac, (uint8_t) (cfgStrLen & 0x000000FF); } - if (wlan_cfg_get_int(pMac, - WNI_CFG_WPS_CFG_METHOD, - &cfgMethods) != QDF_STATUS_SUCCESS) { - pDot11f->ConfigMethods.present = 0; - pDot11f->ConfigMethods.methods = 0; - } else { pDot11f->ConfigMethods.present = 1; pDot11f->ConfigMethods.methods = - (uint16_t) (cfgMethods & 0x0000FFFF); - } + (uint16_t)(pMac->mlme_cfg->wps_params.wps_cfg_method & + 0x0000FFFF); pDot11f->RFBands.present = 0; @@ -5645,7 +5616,6 @@ populate_dot11f_wsc_registrar_info_in_probe_res(tpAniSirGlobal pMac, tDot11fIEWscProbeRes *pDot11f) { const struct sLimWscIeInfo *const pWscIeInfo = &(pMac->lim.wscIeInfo); - uint32_t devicepasswdId; pDot11f->APSetupLocked.present = 1; pDot11f->APSetupLocked.fLocked = pWscIeInfo->apSetupLocked; @@ -5653,14 +5623,9 @@ populate_dot11f_wsc_registrar_info_in_probe_res(tpAniSirGlobal pMac, pDot11f->SelectedRegistrar.present = 1; pDot11f->SelectedRegistrar.selected = pWscIeInfo->selectedRegistrar; - if (wlan_cfg_get_int - (pMac, (uint16_t) WNI_CFG_WPS_DEVICE_PASSWORD_ID, - &devicepasswdId) != QDF_STATUS_SUCCESS) - pe_err("Failed to cfg get id %d", - WNI_CFG_WPS_DEVICE_PASSWORD_ID); - pDot11f->DevicePasswordID.present = 1; - pDot11f->DevicePasswordID.id = (uint16_t) devicepasswdId; + pDot11f->DevicePasswordID.id = + (uint16_t)pMac->mlme_cfg->wps_params.wps_device_password_id; pDot11f->SelectedRegistrarConfigMethods.present = 1; pDot11f->SelectedRegistrarConfigMethods.methods =