qcacld-3.0: Remove legacy WEP CFG definitions

Remove the legacy definitions that are related to the WEP
cfg.
Move them to mlme component

Change-Id: Ibcec8adf15123d12ad7c2eb6ed770b44a093673a
CRs-Fixed: 2324046
This commit is contained in:
Pragaspathi Thilagaraj
2018-09-23 01:55:57 +05:30
committed by nshrivas
parent 7e3322f50d
commit da3b5e21eb
15 changed files with 218 additions and 215 deletions

View File

@@ -62,6 +62,29 @@ QDF_STATUS wlan_mlme_set_cfg_str(uint8_t *src, struct mlme_cfg_str *dst_cfg_str,
QDF_STATUS wlan_mlme_get_edca_params(struct wlan_mlme_edca_params *edca_params, QDF_STATUS wlan_mlme_get_edca_params(struct wlan_mlme_edca_params *edca_params,
uint8_t *data, enum e_edca_type edca_ac); uint8_t *data, enum e_edca_type edca_ac);
/*
* mlme_get_wep_key() - get the wep key to process during auth frame
* @wep_params: cfg wep parameters structure
* @wep_key_id: default key number
* @default_key: default key to be copied
* @key_len: length of the key to copy
*
* Return QDF_STATUS
*/
QDF_STATUS mlme_get_wep_key(struct wlan_mlme_wep_cfg *wep_params,
enum wep_key_id wep_keyid, uint8_t *default_key,
qdf_size_t key_len);
/**
* mlme_set_wep_key() - set the wep keys during auth
* @wep_params: cfg wep parametrs structure
* @wep_key_id: default key number that needs to be copied
* @key_to_set: destination buffer to be copied
* @len: size to be copied
*/
QDF_STATUS mlme_set_wep_key(struct wlan_mlme_wep_cfg *wep_params,
enum wep_key_id wep_keyid, uint8_t *key_to_set,
qdf_size_t len);
/** /**
* wlan_mlme_get_ht_cap_info() - Get the HT cap info config * wlan_mlme_get_ht_cap_info() - Get the HT cap info config
* @psoc: pointer to psoc object * @psoc: pointer to psoc object

View File

@@ -842,6 +842,20 @@ struct wlan_mlme_oce {
#define MLME_WEP_MAX_KEY_LEN (13) #define MLME_WEP_MAX_KEY_LEN (13)
/**
* enum wep_key_id - values passed to get/set wep default keys
* @MLME_WEP_DEFAULT_KEY_1: wep default key 1
* @MLME_WEP_DEFAULT_KEY_2: wep default key 2
* @MLME_WEP_DEFAULT_KEY_3: wep default key 3
* @MLME_WEP_DEFAULT_KEY_4: wep default key 4
*/
enum wep_key_id {
MLME_WEP_DEFAULT_KEY_1 = 0,
MLME_WEP_DEFAULT_KEY_2,
MLME_WEP_DEFAULT_KEY_3,
MLME_WEP_DEFAULT_KEY_4
};
/** /**
* struct wlan_mlme_wep_cfg - WEP related configs * struct wlan_mlme_wep_cfg - WEP related configs
* @is_privacy_enabled: Flag to check if encryption is enabled * @is_privacy_enabled: Flag to check if encryption is enabled

View File

@@ -855,3 +855,80 @@ QDF_STATUS wlan_mlme_get_edca_params(struct wlan_mlme_edca_params *edca_params,
} }
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
QDF_STATUS mlme_get_wep_key(struct wlan_mlme_wep_cfg *wep_params,
enum wep_key_id wep_keyid, uint8_t *default_key,
qdf_size_t key_len)
{
switch (wep_keyid) {
case MLME_WEP_DEFAULT_KEY_1:
wlan_mlme_get_cfg_str(default_key,
&wep_params->wep_default_key_1,
&key_len);
break;
case MLME_WEP_DEFAULT_KEY_2:
wlan_mlme_get_cfg_str(default_key,
&wep_params->wep_default_key_2,
&key_len);
break;
case MLME_WEP_DEFAULT_KEY_3:
wlan_mlme_get_cfg_str(default_key,
&wep_params->wep_default_key_3,
&key_len);
break;
case MLME_WEP_DEFAULT_KEY_4:
wlan_mlme_get_cfg_str(default_key,
&wep_params->wep_default_key_4,
&key_len);
break;
default:
mlme_err("Invalid key id:%d", wep_keyid);
return QDF_STATUS_E_INVAL;
}
return QDF_STATUS_SUCCESS;
}
QDF_STATUS mlme_set_wep_key(struct wlan_mlme_wep_cfg *wep_params,
enum wep_key_id wep_keyid, uint8_t *key_to_set,
qdf_size_t len)
{
if (len == 0) {
mlme_debug("WEP set key length is zero");
return QDF_STATUS_E_FAILURE;
}
switch (wep_keyid) {
case MLME_WEP_DEFAULT_KEY_1:
wlan_mlme_set_cfg_str(key_to_set,
&wep_params->wep_default_key_1,
len);
break;
case MLME_WEP_DEFAULT_KEY_2:
wlan_mlme_set_cfg_str(key_to_set,
&wep_params->wep_default_key_2,
len);
break;
case MLME_WEP_DEFAULT_KEY_3:
wlan_mlme_set_cfg_str(key_to_set,
&wep_params->wep_default_key_3,
len);
break;
case MLME_WEP_DEFAULT_KEY_4:
wlan_mlme_set_cfg_str(key_to_set,
&wep_params->wep_default_key_4,
len);
break;
default:
mlme_err("Invalid key id:%d", wep_keyid);
return QDF_STATUS_E_INVAL;
}
return QDF_STATUS_SUCCESS;
}

View File

@@ -30,11 +30,6 @@ enum {
WNI_CFG_SSID, WNI_CFG_SSID,
WNI_CFG_BEACON_INTERVAL, WNI_CFG_BEACON_INTERVAL,
WNI_CFG_DTIM_PERIOD, WNI_CFG_DTIM_PERIOD,
WNI_CFG_WEP_DEFAULT_KEY_1,
WNI_CFG_WEP_DEFAULT_KEY_2,
WNI_CFG_WEP_DEFAULT_KEY_3,
WNI_CFG_WEP_DEFAULT_KEY_4,
WNI_CFG_WEP_DEFAULT_KEYID,
WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME, WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME,
WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME,
WNI_CFG_JOIN_FAILURE_TIMEOUT, WNI_CFG_JOIN_FAILURE_TIMEOUT,
@@ -51,10 +46,6 @@ enum {
WNI_CFG_LISTEN_INTERVAL, WNI_CFG_LISTEN_INTERVAL,
WNI_CFG_VALID_CHANNEL_LIST, WNI_CFG_VALID_CHANNEL_LIST,
WNI_CFG_APSD_ENABLED, WNI_CFG_APSD_ENABLED,
WNI_CFG_SHARED_KEY_AUTH_ENABLE,
WNI_CFG_OPEN_SYSTEM_AUTH_ENABLE,
WNI_CFG_AUTHENTICATION_TYPE,
WNI_CFG_PRIVACY_ENABLED,
WNI_CFG_SHORT_PREAMBLE, WNI_CFG_SHORT_PREAMBLE,
WNI_CFG_QOS_ENABLED, WNI_CFG_QOS_ENABLED,
WNI_CFG_HEART_BEAT_THRESHOLD, WNI_CFG_HEART_BEAT_THRESHOLD,
@@ -273,10 +264,6 @@ enum {
#define WNI_CFG_STA_ID_LEN 6 #define WNI_CFG_STA_ID_LEN 6
#define WNI_CFG_SSID_LEN 32 #define WNI_CFG_SSID_LEN 32
#define WNI_CFG_WEP_DEFAULT_KEY_1_LEN 13
#define WNI_CFG_WEP_DEFAULT_KEY_2_LEN 13
#define WNI_CFG_WEP_DEFAULT_KEY_3_LEN 13
#define WNI_CFG_WEP_DEFAULT_KEY_4_LEN 13
#define WNI_CFG_SUPPORTED_RATES_11B_LEN 4 #define WNI_CFG_SUPPORTED_RATES_11B_LEN 4
#define WNI_CFG_SUPPORTED_RATES_11A_LEN 8 #define WNI_CFG_SUPPORTED_RATES_11A_LEN 8
#define WNI_CFG_OPERATIONAL_RATE_SET_LEN 12 #define WNI_CFG_OPERATIONAL_RATE_SET_LEN 12

View File

@@ -703,11 +703,7 @@ QDF_STATUS cfg_get_capability_info(tpAniSirGlobal pMac, uint16_t *pCap,
val = sessionEntry->privacy; val = sessionEntry->privacy;
} else { } else {
/* PRIVACY bit */ /* PRIVACY bit */
if (wlan_cfg_get_int(pMac, WNI_CFG_PRIVACY_ENABLED, &val) != val = pMac->mlme_cfg->wep_params.is_privacy_enabled;
QDF_STATUS_SUCCESS) {
pe_err("cfg get WNI_CFG_PRIVACY_ENABLED failed");
return QDF_STATUS_E_FAILURE;
}
} }
if (val) if (val)
pCapInfo->privacy = 1; pCapInfo->privacy = 1;

View File

@@ -45,11 +45,6 @@ const char *cfg_get_string(uint16_t cfg_id)
CASE_RETURN_STRING(WNI_CFG_SSID); CASE_RETURN_STRING(WNI_CFG_SSID);
CASE_RETURN_STRING(WNI_CFG_BEACON_INTERVAL); CASE_RETURN_STRING(WNI_CFG_BEACON_INTERVAL);
CASE_RETURN_STRING(WNI_CFG_DTIM_PERIOD); CASE_RETURN_STRING(WNI_CFG_DTIM_PERIOD);
CASE_RETURN_STRING(WNI_CFG_WEP_DEFAULT_KEY_1);
CASE_RETURN_STRING(WNI_CFG_WEP_DEFAULT_KEY_2);
CASE_RETURN_STRING(WNI_CFG_WEP_DEFAULT_KEY_3);
CASE_RETURN_STRING(WNI_CFG_WEP_DEFAULT_KEY_4);
CASE_RETURN_STRING(WNI_CFG_WEP_DEFAULT_KEYID);
CASE_RETURN_STRING(WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME); CASE_RETURN_STRING(WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME);
CASE_RETURN_STRING(WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME); CASE_RETURN_STRING(WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME);
CASE_RETURN_STRING(WNI_CFG_JOIN_FAILURE_TIMEOUT); CASE_RETURN_STRING(WNI_CFG_JOIN_FAILURE_TIMEOUT);
@@ -66,10 +61,6 @@ const char *cfg_get_string(uint16_t cfg_id)
CASE_RETURN_STRING(WNI_CFG_LISTEN_INTERVAL); CASE_RETURN_STRING(WNI_CFG_LISTEN_INTERVAL);
CASE_RETURN_STRING(WNI_CFG_VALID_CHANNEL_LIST); CASE_RETURN_STRING(WNI_CFG_VALID_CHANNEL_LIST);
CASE_RETURN_STRING(WNI_CFG_APSD_ENABLED); CASE_RETURN_STRING(WNI_CFG_APSD_ENABLED);
CASE_RETURN_STRING(WNI_CFG_SHARED_KEY_AUTH_ENABLE);
CASE_RETURN_STRING(WNI_CFG_OPEN_SYSTEM_AUTH_ENABLE);
CASE_RETURN_STRING(WNI_CFG_AUTHENTICATION_TYPE);
CASE_RETURN_STRING(WNI_CFG_PRIVACY_ENABLED);
CASE_RETURN_STRING(WNI_CFG_SHORT_PREAMBLE); CASE_RETURN_STRING(WNI_CFG_SHORT_PREAMBLE);
CASE_RETURN_STRING(WNI_CFG_QOS_ENABLED); CASE_RETURN_STRING(WNI_CFG_QOS_ENABLED);
CASE_RETURN_STRING(WNI_CFG_HEART_BEAT_THRESHOLD); CASE_RETURN_STRING(WNI_CFG_HEART_BEAT_THRESHOLD);

View File

@@ -53,24 +53,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
WNI_CFG_DTIM_PERIOD_STAMIN, WNI_CFG_DTIM_PERIOD_STAMIN,
WNI_CFG_DTIM_PERIOD_STAMAX, WNI_CFG_DTIM_PERIOD_STAMAX,
WNI_CFG_DTIM_PERIOD_STADEF}, WNI_CFG_DTIM_PERIOD_STADEF},
{WNI_CFG_WEP_DEFAULT_KEY_1,
CFG_CTL_VALID | CFG_CTL_WE | CFG_CTL_RESTART,
0, 65535, 0},
{WNI_CFG_WEP_DEFAULT_KEY_2,
CFG_CTL_VALID | CFG_CTL_WE | CFG_CTL_RESTART,
1, 1, 1},
{WNI_CFG_WEP_DEFAULT_KEY_3,
CFG_CTL_VALID | CFG_CTL_WE | CFG_CTL_RESTART,
0, 5, 5},
{WNI_CFG_WEP_DEFAULT_KEY_4,
CFG_CTL_VALID | CFG_CTL_WE | CFG_CTL_RESTART,
0, 1, 0},
{WNI_CFG_WEP_DEFAULT_KEYID,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
CFG_CTL_NTF_LIM,
WNI_CFG_WEP_DEFAULT_KEYID_STAMIN,
WNI_CFG_WEP_DEFAULT_KEYID_STAMAX,
WNI_CFG_WEP_DEFAULT_KEYID_STADEF},
{WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME, {WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT, CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME_STAMIN, WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME_STAMIN,
@@ -144,28 +126,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
WNI_CFG_APSD_ENABLED_STAMIN, WNI_CFG_APSD_ENABLED_STAMIN,
WNI_CFG_APSD_ENABLED_STAMAX, WNI_CFG_APSD_ENABLED_STAMAX,
WNI_CFG_APSD_ENABLED_STADEF}, WNI_CFG_APSD_ENABLED_STADEF},
{WNI_CFG_SHARED_KEY_AUTH_ENABLE,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
WNI_CFG_SHARED_KEY_AUTH_ENABLE_STAMIN,
WNI_CFG_SHARED_KEY_AUTH_ENABLE_STAMAX,
WNI_CFG_SHARED_KEY_AUTH_ENABLE_STADEF},
{WNI_CFG_OPEN_SYSTEM_AUTH_ENABLE,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
WNI_CFG_OPEN_SYSTEM_AUTH_ENABLE_STAMIN,
WNI_CFG_OPEN_SYSTEM_AUTH_ENABLE_STAMAX,
WNI_CFG_OPEN_SYSTEM_AUTH_ENABLE_STADEF},
{WNI_CFG_AUTHENTICATION_TYPE,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
CFG_CTL_RESTART,
WNI_CFG_AUTHENTICATION_TYPE_STAMIN,
WNI_CFG_AUTHENTICATION_TYPE_STAMAX,
WNI_CFG_AUTHENTICATION_TYPE_STADEF},
{WNI_CFG_PRIVACY_ENABLED,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
CFG_CTL_RESTART,
WNI_CFG_PRIVACY_ENABLED_STAMIN,
WNI_CFG_PRIVACY_ENABLED_STAMAX,
WNI_CFG_PRIVACY_ENABLED_STADEF},
{WNI_CFG_SHORT_PREAMBLE, {WNI_CFG_SHORT_PREAMBLE,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
CFG_CTL_RESTART, CFG_CTL_RESTART,
@@ -1205,22 +1165,6 @@ cfgstatic_string cfg_static_string[CFG_MAX_STATIC_STRING] = {
WNI_CFG_SSID_LEN, WNI_CFG_SSID_LEN,
10, 10,
{1, 2, 3, 4, 5, 6, 7, 8, 9, 0} }, {1, 2, 3, 4, 5, 6, 7, 8, 9, 0} },
{WNI_CFG_WEP_DEFAULT_KEY_1,
WNI_CFG_WEP_DEFAULT_KEY_1_LEN,
0,
{0} },
{WNI_CFG_WEP_DEFAULT_KEY_2,
WNI_CFG_WEP_DEFAULT_KEY_2_LEN,
0,
{0} },
{WNI_CFG_WEP_DEFAULT_KEY_3,
WNI_CFG_WEP_DEFAULT_KEY_3_LEN,
0,
{0} },
{WNI_CFG_WEP_DEFAULT_KEY_4,
WNI_CFG_WEP_DEFAULT_KEY_4_LEN,
0,
{0} },
{WNI_CFG_SUPPORTED_RATES_11B, {WNI_CFG_SUPPORTED_RATES_11B,
WNI_CFG_SUPPORTED_RATES_11B_LEN, WNI_CFG_SUPPORTED_RATES_11B_LEN,
4, 4,

View File

@@ -43,6 +43,7 @@
#include "cds_utils.h" #include "cds_utils.h"
#include "lim_send_messages.h" #include "lim_send_messages.h"
#include "lim_process_fils.h" #include "lim_process_fils.h"
#include "wlan_mlme_api.h"
/** /**
* is_auth_valid * is_auth_valid
@@ -107,9 +108,9 @@ static void lim_process_auth_shared_system_algo(tpAniSirGlobal mac_ctx,
pe_debug("=======> eSIR_SHARED_KEY"); pe_debug("=======> eSIR_SHARED_KEY");
if (LIM_IS_AP_ROLE(pe_session)) if (LIM_IS_AP_ROLE(pe_session))
val = pe_session->privacy; val = pe_session->privacy;
else if (wlan_cfg_get_int(mac_ctx, else
WNI_CFG_PRIVACY_ENABLED, &val) != QDF_STATUS_SUCCESS) val = mac_ctx->mlme_cfg->wep_params.is_privacy_enabled;
pe_warn("couldnt retrieve Privacy option");
cfg_privacy_opt_imp = (uint8_t) val; cfg_privacy_opt_imp = (uint8_t) val;
if (!cfg_privacy_opt_imp) { if (!cfg_privacy_opt_imp) {
pe_err("rx Auth frame for unsupported auth algorithm %d " pe_err("rx Auth frame for unsupported auth algorithm %d "
@@ -567,6 +568,8 @@ static void lim_process_auth_frame_type2(tpAniSirGlobal mac_ctx,
uint8_t defaultkey[SIR_MAC_KEY_LENGTH]; uint8_t defaultkey[SIR_MAC_KEY_LENGTH];
struct tLimPreAuthNode *auth_node; struct tLimPreAuthNode *auth_node;
uint8_t *encr_auth_frame; uint8_t *encr_auth_frame;
struct wlan_mlme_wep_cfg *wep_params = &mac_ctx->mlme_cfg->wep_params;
QDF_STATUS qdf_status;
/* AuthFrame 2 */ /* AuthFrame 2 */
if (pe_session->limMlmState != eLIM_MLM_WT_AUTH_FRAME2_STATE) { if (pe_session->limMlmState != eLIM_MLM_WT_AUTH_FRAME2_STATE) {
@@ -713,12 +716,10 @@ static void lim_process_auth_frame_type2(tpAniSirGlobal mac_ctx,
} else { } else {
/* Shared key authentication */ /* Shared key authentication */
if (LIM_IS_AP_ROLE(pe_session)) if (LIM_IS_AP_ROLE(pe_session))
val = pe_session->privacy; cfg_privacy_opt_imp = pe_session->privacy;
else if (wlan_cfg_get_int(mac_ctx, else
WNI_CFG_PRIVACY_ENABLED, cfg_privacy_opt_imp = wep_params->is_privacy_enabled;
&val) != QDF_STATUS_SUCCESS)
pe_warn("couldnt retrieve Privacy option");
cfg_privacy_opt_imp = (uint8_t) val;
if (!cfg_privacy_opt_imp) { if (!cfg_privacy_opt_imp) {
/* /*
* Requesting STA does not have WEP implemented. * Requesting STA does not have WEP implemented.
@@ -746,21 +747,21 @@ static void lim_process_auth_frame_type2(tpAniSirGlobal mac_ctx,
pe_err("rx auth frm with invalid challenge txtie"); pe_err("rx auth frm with invalid challenge txtie");
return; return;
} }
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_WEP_DEFAULT_KEYID,
&val) != QDF_STATUS_SUCCESS) key_id = mac_ctx->mlme_cfg->wep_params.wep_default_key_id;
pe_warn("could not retrieve Default key_id");
key_id = (uint8_t) val;
val = SIR_MAC_KEY_LENGTH; val = SIR_MAC_KEY_LENGTH;
if (LIM_IS_AP_ROLE(pe_session)) { if (LIM_IS_AP_ROLE(pe_session)) {
tpSirKeys key_ptr = tpSirKeys key_ptr =
&pe_session->WEPKeyMaterial[key_id].key[0]; &pe_session->WEPKeyMaterial[key_id].key[0];
qdf_mem_copy(defaultkey, key_ptr->key, qdf_mem_copy(defaultkey, key_ptr->key,
key_ptr->keyLength); key_ptr->keyLength);
} else if (wlan_cfg_get_str(mac_ctx, } else {
(uint16_t)(WNI_CFG_WEP_DEFAULT_KEY_1 + key_id), qdf_status = mlme_get_wep_key(wep_params,
defaultkey, &val) != QDF_STATUS_SUCCESS) { (MLME_WEP_DEFAULT_KEY_1 +
/* Couldnt get Default key from CFG. */ key_id), defaultkey, val);
if (QDF_IS_STATUS_ERROR(qdf_status))
pe_warn("cant retrieve Defaultkey"); pe_warn("cant retrieve Defaultkey");
auth_frame->authAlgoNumber = auth_frame->authAlgoNumber =
rx_auth_frm_body->authAlgoNumber; rx_auth_frm_body->authAlgoNumber;
auth_frame->authTransactionSeqNumber = auth_frame->authTransactionSeqNumber =
@@ -1123,6 +1124,8 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
tSirMacAuthFrameBody *rx_auth_frm_body, *rx_auth_frame, *auth_frame; tSirMacAuthFrameBody *rx_auth_frm_body, *rx_auth_frame, *auth_frame;
tpSirMacMgmtHdr mac_hdr; tpSirMacMgmtHdr mac_hdr;
struct tLimPreAuthNode *auth_node; struct tLimPreAuthNode *auth_node;
struct wlan_mlme_wep_cfg *wep_params = &mac_ctx->mlme_cfg->wep_params;
QDF_STATUS qdf_status;
/* Get pointer to Authentication frame header and body */ /* Get pointer to Authentication frame header and body */
mac_hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info); mac_hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
@@ -1254,18 +1257,15 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOGE); lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOGE);
goto free; goto free;
} }
if (LIM_IS_AP_ROLE(pe_session)) {
val = pe_session->privacy;
} else if (wlan_cfg_get_int(mac_ctx, WNI_CFG_PRIVACY_ENABLED,
&val) != QDF_STATUS_SUCCESS) {
/* /*
* Accept Authentication frame only if Privacy is * Accept Authentication frame only if Privacy is
* implemented, if Could not get Privacy option * implemented
* from CFG then Log fatal error
*/ */
pe_warn("could not retrieve Privacy option"); if (LIM_IS_AP_ROLE(pe_session))
} cfg_privacy_opt_imp = pe_session->privacy;
cfg_privacy_opt_imp = (uint8_t) val; else
cfg_privacy_opt_imp = wep_params->is_privacy_enabled;
if (!cfg_privacy_opt_imp) { if (!cfg_privacy_opt_imp) {
pe_err("received Authentication frame3 from peer that while privacy option is turned OFF " pe_err("received Authentication frame3 from peer that while privacy option is turned OFF "
@@ -1355,9 +1355,11 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
qdf_mem_copy(defaultkey, key_ptr->key, qdf_mem_copy(defaultkey, key_ptr->key,
key_ptr->keyLength); key_ptr->keyLength);
val = key_ptr->keyLength; val = key_ptr->keyLength;
} else if (wlan_cfg_get_str(mac_ctx, } else {
(uint16_t) (WNI_CFG_WEP_DEFAULT_KEY_1 + key_id), qdf_status = mlme_get_wep_key(wep_params,
defaultkey, &val) != QDF_STATUS_SUCCESS) { (MLME_WEP_DEFAULT_KEY_1 +
key_id), defaultkey, val);
if (QDF_IS_STATUS_ERROR(qdf_status))
pe_warn("could not retrieve Default key"); pe_warn("could not retrieve Default key");
/* /*
@@ -1404,10 +1406,9 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
pe_err("failed to convert Auth Frame to structure or Auth is not valid"); pe_err("failed to convert Auth Frame to structure or Auth is not valid");
goto free; goto free;
} }
} else if ((auth_alg == } else if ((auth_alg == eSIR_AUTH_TYPE_SAE) &&
eSIR_AUTH_TYPE_SAE) && (LIM_IS_STA_ROLE(pe_session))) { (LIM_IS_STA_ROLE(pe_session))) {
lim_process_sae_auth_frame(mac_ctx, lim_process_sae_auth_frame(mac_ctx, rx_pkt_info, pe_session);
rx_pkt_info, pe_session);
goto free; goto free;
} else if ((sir_convert_auth_frame2_struct(mac_ctx, body_ptr, } else if ((sir_convert_auth_frame2_struct(mac_ctx, body_ptr,
frame_len, rx_auth_frame) != QDF_STATUS_SUCCESS) frame_len, rx_auth_frame) != QDF_STATUS_SUCCESS)

View File

@@ -512,14 +512,10 @@ void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg)
* Failure case handle: * Failure case handle:
* Process AUTH confirm from MLM * Process AUTH confirm from MLM
*/ */
if (session_entry->limSmeState == eLIM_SME_WT_AUTH_STATE) { if (session_entry->limSmeState == eLIM_SME_WT_AUTH_STATE)
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_AUTHENTICATION_TYPE, auth_type = mac_ctx->mlme_cfg->wep_params.auth_type;
(uint32_t *) &auth_type) != QDF_STATUS_SUCCESS) { else
pe_err("Fail to retrieve AuthType value");
}
} else {
auth_type = mac_ctx->lim.gLimPreAuthType; auth_type = mac_ctx->lim.gLimPreAuthType;
}
if ((auth_type == eSIR_AUTO_SWITCH) && if ((auth_type == eSIR_AUTO_SWITCH) &&
(auth_cnf->authType == eSIR_SHARED_KEY) && (auth_cnf->authType == eSIR_SHARED_KEY) &&
@@ -2338,10 +2334,8 @@ lim_process_sta_add_bss_rsp_pre_assoc(tpAniSirGlobal mac_ctx,
/* STA Index(genr by HAL) for the BSS entry is stored here */ /* STA Index(genr by HAL) for the BSS entry is stored here */
pStaDs->staIndex = pAddBssParams->staContext.staIdx; pStaDs->staIndex = pAddBssParams->staContext.staIdx;
/* Trigger Authentication with AP */ /* Trigger Authentication with AP */
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_AUTHENTICATION_TYPE, cfgAuthType = mac_ctx->mlme_cfg->wep_params.auth_type;
(uint32_t *) &cfgAuthType) != QDF_STATUS_SUCCESS) {
pe_warn("could not retrieve AuthType");
}
/* Try shared Authentication first */ /* Try shared Authentication first */
if (cfgAuthType == eSIR_AUTO_SWITCH) if (cfgAuthType == eSIR_AUTO_SWITCH)
authMode = eSIR_SHARED_KEY; authMode = eSIR_SHARED_KEY;

View File

@@ -74,7 +74,8 @@ uint8_t
lim_is_auth_algo_supported(tpAniSirGlobal pMac, tAniAuthType authType, lim_is_auth_algo_supported(tpAniSirGlobal pMac, tAniAuthType authType,
tpPESession psessionEntry) tpPESession psessionEntry)
{ {
uint32_t algoEnable, privacyOptImp; bool algoEnable, privacyOptImp;
struct wlan_mlme_wep_cfg *wep_params = &pMac->mlme_cfg->wep_params;
if (authType == eSIR_OPEN_SYSTEM) { if (authType == eSIR_OPEN_SYSTEM) {
@@ -86,13 +87,9 @@ lim_is_auth_algo_supported(tpAniSirGlobal pMac, tAniAuthType authType,
return false; return false;
} }
if (wlan_cfg_get_int(pMac, WNI_CFG_OPEN_SYSTEM_AUTH_ENABLE, algoEnable = wep_params->is_auth_open_system;
&algoEnable) != QDF_STATUS_SUCCESS) {
pe_err("could not retrieve AuthAlgo1 Enable value");
return false;
} else
return algoEnable > 0 ? true : false; return algoEnable > 0 ? true : false;
} else { } else {
if (LIM_IS_AP_ROLE(psessionEntry)) { if (LIM_IS_AP_ROLE(psessionEntry)) {
@@ -102,26 +99,15 @@ lim_is_auth_algo_supported(tpAniSirGlobal pMac, tAniAuthType authType,
else else
algoEnable = false; algoEnable = false;
} else } else {
algoEnable = wep_params->is_shared_key_auth;
if (wlan_cfg_get_int
(pMac, WNI_CFG_SHARED_KEY_AUTH_ENABLE,
&algoEnable) != QDF_STATUS_SUCCESS) {
pe_err("could not retrieve AuthAlgo2 Enable value");
return false;
} }
if (LIM_IS_AP_ROLE(psessionEntry)) { if (LIM_IS_AP_ROLE(psessionEntry))
privacyOptImp = psessionEntry->privacy; privacyOptImp = psessionEntry->privacy;
} else else
privacyOptImp = wep_params->is_privacy_enabled;
if (wlan_cfg_get_int(pMac, WNI_CFG_PRIVACY_ENABLED,
&privacyOptImp) != QDF_STATUS_SUCCESS) {
pe_err("could not retrieve PrivacyOptImplemented value");
return false;
}
return algoEnable && privacyOptImp; return algoEnable && privacyOptImp;
} }
} /****** end lim_is_auth_algo_supported() ******/ } /****** end lim_is_auth_algo_supported() ******/

View File

@@ -43,7 +43,7 @@
#include "lim_sme_req_utils.h" #include "lim_sme_req_utils.h"
/** /**
* lim_is_rs_nie_valid_in_sme_req_message() * lim_is_rsn_ie_valid_in_sme_req_message()
* *
* @mac_ctx Pointer to Global MAC structure * @mac_ctx Pointer to Global MAC structure
* @rsn_ie Pointer to received RSN IE * @rsn_ie Pointer to received RSN IE
@@ -54,17 +54,15 @@
* Return: true when RSN IE is valid, false otherwise * Return: true when RSN IE is valid, false otherwise
* *
*/ */
static uint8_t static uint8_t
lim_is_rsn_ie_valid_in_sme_req_message(tpAniSirGlobal mac_ctx, tpSirRSNie rsn_ie) lim_is_rsn_ie_valid_in_sme_req_message(tpAniSirGlobal mac_ctx,
tpSirRSNie rsn_ie)
{ {
uint8_t start = 0; uint8_t start = 0, privacy;
uint32_t privacy, val; uint32_t val;
int len; int len;
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_PRIVACY_ENABLED, privacy = mac_ctx->mlme_cfg->wep_params.is_privacy_enabled;
&privacy) != QDF_STATUS_SUCCESS)
pe_warn("Unable to retrieve POI from CFG");
val = mac_ctx->mlme_cfg->feature_flags.enable_rsn; val = mac_ctx->mlme_cfg->feature_flags.enable_rsn;
if (rsn_ie->length && (!privacy || !val)) { if (rsn_ie->length && (!privacy || !val)) {
@@ -222,11 +220,10 @@ lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(tpAniSirGlobal mac_ctx,
{ {
uint32_t ret; uint32_t ret;
uint8_t wpa_idx = 0; uint8_t wpa_idx = 0;
uint32_t privacy, val; uint32_t val;
bool privacy;
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_PRIVACY_ENABLED, privacy = mac_ctx->mlme_cfg->wep_params.is_privacy_enabled;
&privacy) != QDF_STATUS_SUCCESS)
pe_warn("Unable to retrieve POI from CFG");
val = mac_ctx->mlme_cfg->feature_flags.enable_rsn; val = mac_ctx->mlme_cfg->feature_flags.enable_rsn;
if (rsn_ie->length && (!privacy || !val)) { if (rsn_ie->length && (!privacy || !val)) {
@@ -711,13 +708,11 @@ lim_is_sme_set_context_req_valid(tpAniSirGlobal pMac,
valid = false; valid = false;
goto end; goto end;
} else if (pSetContextReq->keyMaterial.edType > eSIR_ED_NONE) { } else if (pSetContextReq->keyMaterial.edType > eSIR_ED_NONE) {
uint32_t poi; bool privacy;
if (wlan_cfg_get_int(pMac, WNI_CFG_PRIVACY_ENABLED, privacy = pMac->mlme_cfg->wep_params.is_privacy_enabled;
&poi) != QDF_STATUS_SUCCESS)
pe_warn("Unable to retrieve POI from CFG");
if (!poi) { if (!privacy) {
/** /**
* Privacy is not enabled * Privacy is not enabled
* In order to allow mixed mode for Guest access * In order to allow mixed mode for Guest access

View File

@@ -6026,7 +6026,7 @@ populate_dot11f_timing_advert_frame(tpAniSirGlobal mac_ctx,
QDF_STATUS nSirStatus; QDF_STATUS nSirStatus;
/* Capabilities */ /* Capabilities */
wlan_cfg_get_int(mac_ctx, WNI_CFG_PRIVACY_ENABLED, &val); val = mac_ctx->mlme_cfg->wep_params.is_privacy_enabled;
if (val) if (val)
frame->Capabilities.privacy = 1; frame->Capabilities.privacy = 1;

View File

@@ -56,9 +56,9 @@
#include <wlan_action_oui_ucfg_api.h> #include <wlan_action_oui_ucfg_api.h>
#include "wlan_mlme_api.h" #include "wlan_mlme_api.h"
#include <wlan_utility.h> #include <wlan_utility.h>
#include "wlan_mlme_public_struct.h"
#include "cfg_mlme.h" #include "cfg_mlme.h"
#include "cfg_ucfg_api.h" #include "cfg_ucfg_api.h"
#include "wlan_mlme_api.h"
#define MAX_PWR_FCC_CHAN_12 8 #define MAX_PWR_FCC_CHAN_12 8
#define MAX_PWR_FCC_CHAN_13 2 #define MAX_PWR_FCC_CHAN_13 2
@@ -4819,20 +4819,22 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, struct csr_roam_profile *pProfile,
* CFG based on the advertised privacy setting from the AP for WPA * CFG based on the advertised privacy setting from the AP for WPA
* associations. See note below in this function... * associations. See note below in this function...
*/ */
uint32_t PrivacyEnabled = 0, RsnEnabled = 0, WepDefaultKeyId = 0; uint32_t privacy_enabled = 0, RsnEnabled = 0, wep_default_key_id = 0;
uint32_t WepKeyLength = WNI_CFG_WEP_KEY_LENGTH_5; uint32_t WepKeyLength = WNI_CFG_WEP_KEY_LENGTH_5;
uint32_t Key0Length = 0, Key1Length = 0, Key2Length = 0, Key3Length = 0; uint32_t Key0Length = 0, Key1Length = 0, Key2Length = 0, Key3Length = 0;
/* Reserve for the biggest key */ /* Reserve for the biggest key */
uint8_t Key0[WNI_CFG_WEP_DEFAULT_KEY_1_LEN]; uint8_t Key0[MLME_WEP_MAX_KEY_LEN];
uint8_t Key1[WNI_CFG_WEP_DEFAULT_KEY_2_LEN]; uint8_t Key1[MLME_WEP_MAX_KEY_LEN];
uint8_t Key2[WNI_CFG_WEP_DEFAULT_KEY_3_LEN]; uint8_t Key2[MLME_WEP_MAX_KEY_LEN];
uint8_t Key3[WNI_CFG_WEP_DEFAULT_KEY_4_LEN]; uint8_t Key3[MLME_WEP_MAX_KEY_LEN];
struct wlan_mlme_wep_cfg *wep_params = &pMac->mlme_cfg->wep_params;
switch (pProfile->negotiatedUCEncryptionType) { switch (pProfile->negotiatedUCEncryptionType) {
case eCSR_ENCRYPT_TYPE_NONE: case eCSR_ENCRYPT_TYPE_NONE:
/* for NO encryption, turn off Privacy and Rsn. */ /* for NO encryption, turn off Privacy and Rsn. */
PrivacyEnabled = 0; privacy_enabled = 0;
RsnEnabled = 0; RsnEnabled = 0;
/* clear out the WEP keys that may be hanging around. */ /* clear out the WEP keys that may be hanging around. */
Key0Length = 0; Key0Length = 0;
@@ -4845,10 +4847,10 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, struct csr_roam_profile *pProfile,
case eCSR_ENCRYPT_TYPE_WEP40: case eCSR_ENCRYPT_TYPE_WEP40:
/* Privacy is ON. NO RSN for Wep40 static key. */ /* Privacy is ON. NO RSN for Wep40 static key. */
PrivacyEnabled = 1; privacy_enabled = 1;
RsnEnabled = 0; RsnEnabled = 0;
/* Set the Wep default key ID. */ /* Set the Wep default key ID. */
WepDefaultKeyId = pProfile->Keys.defaultIndex; wep_default_key_id = pProfile->Keys.defaultIndex;
/* Wep key size if 5 bytes (40 bits). */ /* Wep key size if 5 bytes (40 bits). */
WepKeyLength = WNI_CFG_WEP_KEY_LENGTH_5; WepKeyLength = WNI_CFG_WEP_KEY_LENGTH_5;
/* /*
@@ -4896,10 +4898,10 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, struct csr_roam_profile *pProfile,
case eCSR_ENCRYPT_TYPE_WEP104: case eCSR_ENCRYPT_TYPE_WEP104:
/* Privacy is ON. NO RSN for Wep40 static key. */ /* Privacy is ON. NO RSN for Wep40 static key. */
PrivacyEnabled = 1; privacy_enabled = 1;
RsnEnabled = 0; RsnEnabled = 0;
/* Set the Wep default key ID. */ /* Set the Wep default key ID. */
WepDefaultKeyId = pProfile->Keys.defaultIndex; wep_default_key_id = pProfile->Keys.defaultIndex;
/* Wep key size if 13 bytes (104 bits). */ /* Wep key size if 13 bytes (104 bits). */
WepKeyLength = WNI_CFG_WEP_KEY_LENGTH_13; WepKeyLength = WNI_CFG_WEP_KEY_LENGTH_13;
/* /*
@@ -4956,7 +4958,7 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, struct csr_roam_profile *pProfile,
* (setting of the privacy CFG based on the advertised * (setting of the privacy CFG based on the advertised
* privacy setting from AP for WPA/WAPI associations). * privacy setting from AP for WPA/WAPI associations).
*/ */
PrivacyEnabled = (0 != fPrivacy); privacy_enabled = (0 != fPrivacy);
/* turn on RSN enabled for WPA associations */ /* turn on RSN enabled for WPA associations */
RsnEnabled = 1; RsnEnabled = 1;
/* clear static WEP keys that may be hanging around. */ /* clear static WEP keys that may be hanging around. */
@@ -4966,18 +4968,18 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, struct csr_roam_profile *pProfile,
Key3Length = 0; Key3Length = 0;
break; break;
default: default:
PrivacyEnabled = 0; privacy_enabled = 0;
RsnEnabled = 0; RsnEnabled = 0;
break; break;
} }
cfg_set_int(pMac, WNI_CFG_PRIVACY_ENABLED, PrivacyEnabled); pMac->mlme_cfg->wep_params.is_privacy_enabled = privacy_enabled;
pMac->mlme_cfg->feature_flags.enable_rsn = RsnEnabled; pMac->mlme_cfg->feature_flags.enable_rsn = RsnEnabled;
cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_1, Key0, Key0Length); mlme_set_wep_key(wep_params, MLME_WEP_DEFAULT_KEY_1, Key0, Key0Length);
cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_2, Key1, Key1Length); mlme_set_wep_key(wep_params, MLME_WEP_DEFAULT_KEY_2, Key1, Key1Length);
cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_3, Key2, Key2Length); mlme_set_wep_key(wep_params, MLME_WEP_DEFAULT_KEY_3, Key2, Key2Length);
cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_4, Key3, Key3Length); mlme_set_wep_key(wep_params, MLME_WEP_DEFAULT_KEY_4, Key3, Key3Length);
cfg_set_int(pMac, WNI_CFG_WEP_DEFAULT_KEYID, WepDefaultKeyId); pMac->mlme_cfg->wep_params.wep_default_key_id = wep_default_key_id;
} }
static void csr_set_cfg_ssid(tpAniSirGlobal pMac, tSirMacSSid *pSSID) static void csr_set_cfg_ssid(tpAniSirGlobal pMac, tSirMacSSid *pSSID)
@@ -5365,7 +5367,8 @@ QDF_STATUS csr_roam_set_bss_config_cfg(tpAniSirGlobal pMac, uint32_t sessionId,
csr_set_cfg_ssid(pMac, &pBssConfig->SSID); csr_set_cfg_ssid(pMac, &pBssConfig->SSID);
/* Auth type */ /* Auth type */
cfg_set_int(pMac, WNI_CFG_AUTHENTICATION_TYPE, pBssConfig->authType); pMac->mlme_cfg->wep_params.auth_type = pBssConfig->authType;
/* encryption type */ /* encryption type */
csr_set_cfg_privacy(pMac, pProfile, (bool) pBssConfig->BssCap.privacy); csr_set_cfg_privacy(pMac, pProfile, (bool) pBssConfig->BssCap.privacy);
/* short slot time */ /* short slot time */
@@ -10886,6 +10889,7 @@ QDF_STATUS csr_roam_send_set_key_cmd(tpAniSirGlobal mac_ctx,
set_key_cmd->encType); set_key_cmd->encType);
bool unicast = (set_key_cmd->peermac.bytes[0] == 0xFF) ? false : true; bool unicast = (set_key_cmd->peermac.bytes[0] == 0xFF) ? false : true;
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
struct wlan_mlme_wep_cfg *wep_params = &mac_ctx->mlme_cfg->wep_params;
struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id); struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
WLAN_HOST_DIAG_EVENT_DEF(setKeyEvent, WLAN_HOST_DIAG_EVENT_DEF(setKeyEvent,
@@ -10923,13 +10927,8 @@ QDF_STATUS csr_roam_send_set_key_cmd(tpAniSirGlobal mac_ctx,
session->connectedProfile.bssid.bytes, session->connectedProfile.bssid.bytes,
QDF_MAC_ADDR_SIZE); QDF_MAC_ADDR_SIZE);
if (CSR_IS_ENC_TYPE_STATIC(set_key_cmd->encType)) { if (CSR_IS_ENC_TYPE_STATIC(set_key_cmd->encType)) {
uint32_t defKeyId;
/* It has to be static WEP here */ /* It has to be static WEP here */
if (QDF_IS_STATUS_SUCCESS(wlan_cfg_get_int(mac_ctx, setKeyEvent.keyId = wep_params->wep_default_key_id;
WNI_CFG_WEP_DEFAULT_KEYID,
&defKeyId))) {
setKeyEvent.keyId = (uint8_t) defKeyId;
}
} else { } else {
setKeyEvent.keyId = set_key_cmd->keyId; setKeyEvent.keyId = set_key_cmd->keyId;
} }

View File

@@ -75,6 +75,7 @@
#include "wlan_p2p_cfg_api.h" #include "wlan_p2p_cfg_api.h"
#include "cfg_ucfg_api.h" #include "cfg_ucfg_api.h"
#include "cfg_mlme_sta.h" #include "cfg_mlme_sta.h"
#include "wlan_mlme_api.h"
/** /**
* wma_send_bcn_buf_ll() - prepare and send beacon buffer to fw for LL * wma_send_bcn_buf_ll() - prepare and send beacon buffer to fw for LL
@@ -1746,19 +1747,18 @@ static void wma_read_cfg_wepkey(tp_wma_handle wma_handle,
QDF_STATUS status; QDF_STATUS status;
uint32_t val = SIR_MAC_KEY_LENGTH; uint32_t val = SIR_MAC_KEY_LENGTH;
uint8_t i, j; uint8_t i, j;
tpAniSirGlobal mac_ctx = wma_handle->mac_context;
WMA_LOGD("Reading WEP keys from cfg"); WMA_LOGD("Reading WEP keys from cfg");
/* NOTE:def_key_idx is initialized to 0 by the caller */ /* NOTE:def_key_idx is initialized to 0 by the caller */
status = wlan_cfg_get_int(wma_handle->mac_context, *def_key_idx = mac_ctx->mlme_cfg->wep_params.wep_default_key_id;
WNI_CFG_WEP_DEFAULT_KEYID, def_key_idx);
if (status != QDF_STATUS_SUCCESS)
WMA_LOGE("Unable to read default id, defaulting to 0");
for (i = 0, j = 0; i < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS; i++) { for (i = 0, j = 0; i < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS; i++) {
status = wlan_cfg_get_str(wma_handle->mac_context, status = mlme_get_wep_key(&mac_ctx->mlme_cfg->wep_params,
(uint16_t) WNI_CFG_WEP_DEFAULT_KEY_1 + (MLME_WEP_DEFAULT_KEY_1 +
i, key_info[j].key, &val); i), key_info[j].key, val);
if (status != QDF_STATUS_SUCCESS) { if (QDF_IS_STATUS_ERROR(status)) {
WMA_LOGE("WEP key is not configured at :%d", i); WMA_LOGE("WEP key is not configured at :%d", i);
} else { } else {
key_info[j].keyId = i; key_info[j].keyId = i;

View File

@@ -2693,14 +2693,10 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
if (wlan_cfg_get_int(pMac, WNI_CFG_PRIVACY_ENABLED, &val) !=
QDF_STATUS_SUCCESS) {
QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
"Failed to get WNI_CFG_PRIVACY_ENABLED");
return QDF_STATUS_E_FAILURE;
}
selfCaps.ess = 1; selfCaps.ess = 1;
selfCaps.ibss = 0; selfCaps.ibss = 0;
val = pMac->mlme_cfg->wep_params.is_privacy_enabled;
if (val) if (val)
selfCaps.privacy = 1; selfCaps.privacy = 1;
if (wlan_cfg_get_int(pMac, WNI_CFG_SHORT_PREAMBLE, &val) != if (wlan_cfg_get_int(pMac, WNI_CFG_SHORT_PREAMBLE, &val) !=