qcacld-3.0: Add MLME CFG items of WEP configs
Add the WEP ini configs to MLME CFG for the following: 1. WNI_CFG_WEP_DEFAULT_KEY_1 2. WNI_CFG_WEP_DEFAULT_KEY_2 3. WNI_CFG_WEP_DEFAULT_KEY_3 4. WNI_CFG_WEP_DEFAULT_KEY_4 5. WNI_CFG_WEP_DEFAULT_KEYID 6. WNI_CFG_SHARED_KEY_AUTH_ENABLE 7. WNI_CFG_OPEN_SYSTEM_AUTH_ENABLE 8. WNI_CFG_AUTHENTICATION_TYPE 9. WNI_CFG_PRIVACY_ENABLED Add basic infra for WEP cfg items Change-Id: I6c2f6f69feeb73234a6cab7ccaaed7637f041ed2 CRs-Fixed: 2321317
This commit is contained in:

committed by
nshrivas

parent
2e01f751e0
commit
56274a1ba7
@@ -908,6 +908,39 @@ static void mlme_init_oce_cfg(struct wlan_objmgr_psoc *psoc,
|
|||||||
oce->feature_bitmap = val;
|
oce->feature_bitmap = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void mlme_init_wep_keys(struct wlan_mlme_wep_cfg *wep_params)
|
||||||
|
{
|
||||||
|
/* initialize the default key values to zero */
|
||||||
|
wep_params->wep_default_key_1.len = MLME_WEP_MAX_KEY_LEN;
|
||||||
|
wep_params->wep_default_key_1.max_len = MLME_WEP_MAX_KEY_LEN;
|
||||||
|
qdf_mem_zero(wep_params->wep_default_key_1.data, MLME_WEP_MAX_KEY_LEN);
|
||||||
|
|
||||||
|
wep_params->wep_default_key_2.len = MLME_WEP_MAX_KEY_LEN;
|
||||||
|
wep_params->wep_default_key_2.max_len = MLME_WEP_MAX_KEY_LEN;
|
||||||
|
qdf_mem_zero(wep_params->wep_default_key_2.data, MLME_WEP_MAX_KEY_LEN);
|
||||||
|
|
||||||
|
wep_params->wep_default_key_3.len = MLME_WEP_MAX_KEY_LEN;
|
||||||
|
wep_params->wep_default_key_3.max_len = MLME_WEP_MAX_KEY_LEN;
|
||||||
|
qdf_mem_zero(wep_params->wep_default_key_3.data, MLME_WEP_MAX_KEY_LEN);
|
||||||
|
|
||||||
|
wep_params->wep_default_key_4.len = MLME_WEP_MAX_KEY_LEN;
|
||||||
|
wep_params->wep_default_key_4.max_len = MLME_WEP_MAX_KEY_LEN;
|
||||||
|
qdf_mem_zero(wep_params->wep_default_key_4.data, MLME_WEP_MAX_KEY_LEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void mlme_init_wep_cfg(struct wlan_mlme_wep_cfg *wep_params)
|
||||||
|
{
|
||||||
|
wep_params->is_privacy_enabled = cfg_default(CFG_PRIVACY_ENABLED);
|
||||||
|
wep_params->auth_type = cfg_default(CFG_AUTHENTICATION_TYPE);
|
||||||
|
wep_params->is_shared_key_auth =
|
||||||
|
cfg_default(CFG_SHARED_KEY_AUTH_ENABLE);
|
||||||
|
wep_params->is_auth_open_system =
|
||||||
|
cfg_default(CFG_OPEN_SYSTEM_AUTH_ENABLE);
|
||||||
|
|
||||||
|
wep_params->wep_default_key_id = cfg_default(CFG_WEP_DEFAULT_KEYID);
|
||||||
|
mlme_init_wep_keys(wep_params);
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||||
@@ -937,6 +970,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
|||||||
mlme_init_feature_flag_in_cfg(psoc, &mlme_cfg->feature_flags);
|
mlme_init_feature_flag_in_cfg(psoc, &mlme_cfg->feature_flags);
|
||||||
mlme_init_scoring_cfg(psoc, &mlme_cfg->scoring);
|
mlme_init_scoring_cfg(psoc, &mlme_cfg->scoring);
|
||||||
mlme_init_oce_cfg(psoc, &mlme_cfg->oce);
|
mlme_init_oce_cfg(psoc, &mlme_cfg->oce);
|
||||||
|
mlme_init_wep_cfg(&mlme_cfg->wep_params);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@@ -40,6 +40,7 @@
|
|||||||
#include "cfg_mlme_scoring.h"
|
#include "cfg_mlme_scoring.h"
|
||||||
#include "cfg_mlme_oce.h"
|
#include "cfg_mlme_oce.h"
|
||||||
#include "cfg_mlme_feature_flag.h"
|
#include "cfg_mlme_feature_flag.h"
|
||||||
|
#include "cfg_mlme_wep_params.h"
|
||||||
|
|
||||||
/* Please Maintain Alphabetic Order here */
|
/* Please Maintain Alphabetic Order here */
|
||||||
#define CFG_MLME_ALL \
|
#define CFG_MLME_ALL \
|
||||||
@@ -60,5 +61,6 @@
|
|||||||
CFG_SCORING_ALL \
|
CFG_SCORING_ALL \
|
||||||
CFG_STA_ALL \
|
CFG_STA_ALL \
|
||||||
CFG_VHT_CAPS_ALL \
|
CFG_VHT_CAPS_ALL \
|
||||||
|
CFG_WEP_PARAMS_ALL
|
||||||
|
|
||||||
#endif /* __CFG_MLME_H */
|
#endif /* __CFG_MLME_H */
|
||||||
|
65
mlme/dispatcher/inc/cfg_mlme_wep_params.h
Normal file
65
mlme/dispatcher/inc/cfg_mlme_wep_params.h
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011-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 WEP parameters related
|
||||||
|
* converged configuration.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __CFG_MLME_WEP_PARAMS_H
|
||||||
|
#define __CFG_MLME_WEP_PARAMS_H
|
||||||
|
|
||||||
|
#define CFG_WEP_DEFAULT_KEYID CFG_UINT( \
|
||||||
|
"wep_default_key_id", \
|
||||||
|
0, \
|
||||||
|
3, \
|
||||||
|
0, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"wep default key id")
|
||||||
|
|
||||||
|
#define CFG_SHARED_KEY_AUTH_ENABLE CFG_BOOL( \
|
||||||
|
"shared_key_auth", \
|
||||||
|
1, \
|
||||||
|
"shared key authentication")
|
||||||
|
|
||||||
|
#define CFG_OPEN_SYSTEM_AUTH_ENABLE CFG_BOOL( \
|
||||||
|
"open_system_auth", \
|
||||||
|
1, \
|
||||||
|
"Open system authentication")
|
||||||
|
|
||||||
|
#define CFG_AUTHENTICATION_TYPE CFG_UINT( \
|
||||||
|
"auth_type", \
|
||||||
|
0, \
|
||||||
|
3, \
|
||||||
|
0, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"authentication type")
|
||||||
|
|
||||||
|
#define CFG_PRIVACY_ENABLED CFG_BOOL( \
|
||||||
|
"privacy_enabled", \
|
||||||
|
0, \
|
||||||
|
"wep privacy")
|
||||||
|
|
||||||
|
#define CFG_WEP_PARAMS_ALL \
|
||||||
|
CFG(CFG_WEP_DEFAULT_KEYID) \
|
||||||
|
CFG(CFG_SHARED_KEY_AUTH_ENABLE) \
|
||||||
|
CFG(CFG_OPEN_SYSTEM_AUTH_ENABLE) \
|
||||||
|
CFG(CFG_AUTHENTICATION_TYPE) \
|
||||||
|
CFG(CFG_PRIVACY_ENABLED)
|
||||||
|
|
||||||
|
#endif /* __CFG_MLME_WEP_PARAMS_H */
|
@@ -809,8 +809,35 @@ struct wlan_mlme_oce {
|
|||||||
uint8_t feature_bitmap;
|
uint8_t feature_bitmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define MLME_WEP_MAX_KEY_LEN (13)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct wlan_mlme_wep_cfg - WEP related configs
|
||||||
|
* @is_privacy_enabled: Flag to check if encryption is enabled
|
||||||
|
* @is_shared_key_auth: Flag to check if the auth type is shared key
|
||||||
|
* @is_auth_open_system: Flag to check if the auth type is open
|
||||||
|
* @auth_type: Authentication type value
|
||||||
|
* @wep_default_key_id: Default WEP key id
|
||||||
|
* @wep_default_key_1: WEP encryption key 1
|
||||||
|
* @wep_default_key_2: WEP encryption key 2
|
||||||
|
* @wep_default_key_3: WEP encryption key 3
|
||||||
|
* @wep_default_key_4: WEP encryption key 4
|
||||||
|
*/
|
||||||
|
struct wlan_mlme_wep_cfg {
|
||||||
|
bool is_privacy_enabled;
|
||||||
|
bool is_shared_key_auth;
|
||||||
|
bool is_auth_open_system;
|
||||||
|
uint8_t auth_type;
|
||||||
|
uint8_t wep_default_key_id;
|
||||||
|
struct mlme_cfg_str wep_default_key_1;
|
||||||
|
struct mlme_cfg_str wep_default_key_2;
|
||||||
|
struct mlme_cfg_str wep_default_key_3;
|
||||||
|
struct mlme_cfg_str wep_default_key_4;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct wlan_mlme_cfg - MLME config items
|
* struct wlan_mlme_cfg - MLME config items
|
||||||
|
* @chainmask_cfg: VHT chainmask related cfg items
|
||||||
* @ht_cfg: HT related CFG Items
|
* @ht_cfg: HT related CFG Items
|
||||||
* @he_caps: HE related cfg items
|
* @he_caps: HE related cfg items
|
||||||
* @lfr: LFR related CFG Items
|
* @lfr: LFR related CFG Items
|
||||||
@@ -821,8 +848,10 @@ struct wlan_mlme_oce {
|
|||||||
* @sta: sta CFG Items
|
* @sta: sta CFG Items
|
||||||
* @scoring: BSS Scoring related CFG Items
|
* @scoring: BSS Scoring related CFG Items
|
||||||
* @feature_flags: Feature flag config items
|
* @feature_flags: Feature flag config items
|
||||||
|
* @wep_params: WEP related config items
|
||||||
*/
|
*/
|
||||||
struct wlan_mlme_cfg {
|
struct wlan_mlme_cfg {
|
||||||
|
struct wlan_mlme_chainmask chainmask_cfg;
|
||||||
struct wlan_mlme_edca_params edca_params;
|
struct wlan_mlme_edca_params edca_params;
|
||||||
struct wlan_mlme_generic gen;
|
struct wlan_mlme_generic gen;
|
||||||
struct wlan_mlme_ht_caps ht_caps;
|
struct wlan_mlme_ht_caps ht_caps;
|
||||||
@@ -834,12 +863,12 @@ struct wlan_mlme_cfg {
|
|||||||
struct wlan_mlme_qos qos_mlme_params;
|
struct wlan_mlme_qos qos_mlme_params;
|
||||||
struct wlan_mlme_rates rates;
|
struct wlan_mlme_rates rates;
|
||||||
struct wlan_mlme_sap_protection sap_protection_cfg;
|
struct wlan_mlme_sap_protection sap_protection_cfg;
|
||||||
struct wlan_mlme_chainmask chainmask_cfg;
|
|
||||||
struct wlan_mlme_cfg_sap sap_cfg;
|
struct wlan_mlme_cfg_sap sap_cfg;
|
||||||
struct wlan_mlme_sta_cfg sta;
|
struct wlan_mlme_sta_cfg sta;
|
||||||
struct wlan_mlme_scoring_cfg scoring;
|
struct wlan_mlme_scoring_cfg scoring;
|
||||||
struct wlan_mlme_oce oce;
|
struct wlan_mlme_oce oce;
|
||||||
struct wlan_mlme_feature_flag feature_flags;
|
struct wlan_mlme_feature_flag feature_flags;
|
||||||
|
struct wlan_mlme_wep_cfg wep_params;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user