qcacld-3.0: Add support to allow WEP/TKIP in HE for test

Add support for test configuration to allow WEP/TKIP in HE mode

Change-Id: I19b0620bc3b8e1f7319af5e762e565fcaba11b79
CRs-fixed: 2194497
This commit is contained in:
Kiran Kumar Lokere 2018-02-23 13:23:52 -08:00 • committed by nshrivas
commit 722dccd92a
8 changed files with 49 additions and 11 deletions

View file

@ -6289,6 +6289,8 @@ wlan_hdd_wifi_test_config_policy[
.type = NLA_U8},
[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_HE_FRAGMENTATION] = {
.type = NLA_U8},
[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_WEP_TKIP_IN_HE] = {
.type = NLA_U8},
};
/**
@ -7268,9 +7270,18 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
uint8_t cfg_val = 0;
uint8_t set_val = 0;
tSmeConfigParams *sme_config;
bool update_sme_cfg = false;
ENTER_DEV(dev);
sme_config = qdf_mem_malloc(sizeof(*sme_config));
if (!sme_config) {
hdd_err("mem alloc failed for sme_config");
return -ENOMEM;
}
sme_get_config_param(hdd_ctx->hHal, sme_config);
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
hdd_err("Command not allowed in FTM mode");
return -EPERM;
@ -7316,13 +7327,6 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
if (tb[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_WMM_ENABLE]) {
cfg_val = nla_get_u8(tb[
QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_WMM_ENABLE]);
sme_config = qdf_mem_malloc(sizeof(*sme_config));
if (!sme_config) {
hdd_err("mem alloc failed for sme_config");
return -ENOMEM;
}
qdf_mem_zero(sme_config, sizeof(*sme_config));
sme_get_config_param(hdd_ctx->hHal, sme_config);
if (!cfg_val) {
sme_config->csrConfig.WMMSupportMode =
hdd_to_csr_wmm_mode(HDD_WMM_USER_MODE_NO_QOS);
@ -7332,8 +7336,7 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
hdd_to_csr_wmm_mode(hdd_ctx->config->WmmMode);
hdd_debug("using wmm default value");
}
sme_update_config(hdd_ctx->hHal, sme_config);
qdf_mem_free(sme_config);
update_sme_cfg = true;
}
if (tb[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_SEND_ADDBA_REQ]) {
@ -7367,6 +7370,20 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
adapter->session_id, set_val);
}
if (tb[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_WEP_TKIP_IN_HE]) {
cfg_val = nla_get_u8(tb[
QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_WEP_TKIP_IN_HE]);
sme_config->csrConfig.wep_tkip_in_he = cfg_val;
hdd_debug("Set WEP/TKIP allow in HE %d", cfg_val);
update_sme_cfg = true;
}
if (update_sme_cfg)
sme_update_config(hdd_ctx->hHal, sme_config);
qdf_mem_free(sme_config);
return ret_val;
}

View file

@ -1127,7 +1127,7 @@ typedef struct sSirSmeJoinReq {
uint8_t enableHtSmps;
uint8_t htSmps;
bool send_smps_action;
bool he_with_wep_tkip;
uint8_t max_amsdu_num;
bool isWMEenabled;
bool isQosEnabled;

View file

@ -542,6 +542,7 @@ typedef struct sPESession /* Added to Support BT-AMP */
uint8_t ht_client_cnt;
bool force_24ghz_in_ht20;
bool ch_switch_in_progress;
bool he_with_wep_tkip;
#ifdef WLAN_FEATURE_FILS_SK
struct pe_fils_session *fils_info;
struct qdf_mac_addr dst_mac;

View file

@ -1347,6 +1347,7 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
session->limWmeEnabled = sme_join_req->isWMEenabled;
session->limQosEnabled = sme_join_req->isQosEnabled;
session->wps_registration = sme_join_req->wps_registration;
session->he_with_wep_tkip = sme_join_req->he_with_wep_tkip;
session->enable_bcast_probe_rsp =
sme_join_req->enable_bcast_probe_rsp;

View file

@ -1828,6 +1828,9 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
populate_dot11f_ht_caps(mac_ctx, pe_session, &frm->HTCaps);
QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
&frm->HTCaps, sizeof(frm->HTCaps));
} else if (pe_session->he_with_wep_tkip) {
pe_debug("Populate HT Caps in Assoc Request with WEP/TKIP");
populate_dot11f_ht_caps(mac_ctx, NULL, &frm->HTCaps);
}
pe_debug("SupportedChnlWidth: %d, mimoPS: %d, GF: %d, short GI20:%d, shortGI40: %d, dsssCck: %d, AMPDU Param: %x",
frm->HTCaps.supportedChannelWidthSet,
@ -1850,7 +1853,11 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
populate_dot11f_operating_mode(mac_ctx,
&frm->OperatingMode, pe_session);
}
} else if (pe_session->he_with_wep_tkip) {
pe_debug("Populate VHT IEs in Assoc Request with WEP/TKIP");
populate_dot11f_vht_caps(mac_ctx, NULL, &frm->VHTCaps);
}
if (!vht_enabled &&
pe_session->is_vendor_specific_vhtcaps) {
pe_debug("Populate Vendor VHT IEs in Assoc Request");
@ -1878,6 +1885,9 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
pe_debug("Populate HE IEs");
populate_dot11f_he_caps(mac_ctx, pe_session,
&frm->he_cap);
} else if (pe_session->he_with_wep_tkip) {
pe_debug("Populate HE IEs in Assoc Request with WEP/TKIP");
populate_dot11f_he_caps(mac_ctx, NULL, &frm->he_cap);
}
if (pe_session->pLimJoinReq->is11Rconnection) {

View file

@ -1354,6 +1354,7 @@ typedef struct tagCsrConfigParam {
uint32_t btm_max_attempt_cnt;
uint32_t btm_sticky_time;
uint32_t offload_11k_enable_bitmask;
bool wep_tkip_in_he;
struct csr_neighbor_report_offload_params neighbor_report_offload;
} tCsrConfigParam;

View file

@ -621,6 +621,7 @@ struct csr_config {
uint32_t btm_max_attempt_cnt;
uint32_t btm_sticky_time;
uint32_t offload_11k_enable_bitmask;
bool wep_tkip_in_he;
struct csr_neighbor_report_offload_params neighbor_report_offload;
};

View file

@ -2591,6 +2591,7 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pMac->roam.configParam.AdHocChannel5G = pParam->AdHocChannel5G;
pMac->roam.configParam.bandCapability = pParam->bandCapability;
pMac->roam.configParam.cbChoice = pParam->cbChoice;
pMac->roam.configParam.wep_tkip_in_he = pParam->wep_tkip_in_he;
pMac->roam.configParam.neighborRoamConfig.
delay_before_vdev_stop =
pParam->neighborRoamConfig.delay_before_vdev_stop;
@ -3205,6 +3206,7 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
#endif
pParam->enable_tx_ldpc = cfg_params->tx_ldpc_enable;
pParam->enable_rx_ldpc = cfg_params->rx_ldpc_enable;
pParam->wep_tkip_in_he = cfg_params->wep_tkip_in_he;
pParam->disable_high_ht_mcs_2x2 = cfg_params->disable_high_ht_mcs_2x2;
pParam->max_amsdu_num = cfg_params->max_amsdu_num;
pParam->nSelect5GHzMargin = cfg_params->nSelect5GHzMargin;
@ -13131,7 +13133,8 @@ enum csr_cfgdot11mode curr_mode = mac_ctx->roam.configParam.uCfgDot11Mode;
&& (profile->EncryptionType.encryptionType[0] ==
eCSR_ENCRYPT_TYPE_NONE)))
&& ((eCSR_CFG_DOT11_MODE_11N == cfg_dot11_mode) ||
(eCSR_CFG_DOT11_MODE_11AC == cfg_dot11_mode))) {
(eCSR_CFG_DOT11_MODE_11AC == cfg_dot11_mode) ||
(eCSR_CFG_DOT11_MODE_11AX == cfg_dot11_mode))) {
/* We cannot do 11n here */
if (WLAN_REG_IS_24GHZ_CH(opr_chn))
cfg_dot11_mode = eCSR_CFG_DOT11_MODE_11G;
@ -15279,6 +15282,10 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
}
}
if (!CSR_IS_11n_ALLOWED(pProfile->negotiatedUCEncryptionType))
csr_join_req->he_with_wep_tkip =
pMac->roam.configParam.wep_tkip_in_he;
csr_join_req->UCEncryptionType =
csr_translate_encrypt_type_to_ed_type
(pProfile->negotiatedUCEncryptionType);