qcacld-3.0: Reset crypto params on open mode connect request

In case of open mode the crypto params are not updated and thus
older params values are maintained. This can lead to failure
in open mode connect.

Thus Reset crypto params on open mode connect request

Change-Id: Ia986f1b0d7b29410d32090be3e9bfb9db96c6c11
CRs-Fixed: 2713346
This commit is contained in:
gaurank kathpalia 2020-06-18 12:53:01 +05:30 committed by nshrivas
parent 61409803d7
commit 015b76d0c7

View File

@ -19132,20 +19132,41 @@ static void hdd_populate_crypto_cipher_type(u32 cipher,
static void hdd_populate_crypto_params(struct wlan_objmgr_vdev *vdev,
struct cfg80211_connect_params *req)
{
uint32_t set_val = 0;
hdd_populate_crypto_auth_type(vdev, req->auth_type);
if (req->crypto.n_akm_suites)
if (req->crypto.n_akm_suites) {
hdd_populate_crypto_akm_type(vdev, req->crypto.akm_suites[0]);
if (req->crypto.n_ciphers_pairwise)
} else {
/* Reset to none */
HDD_SET_BIT(set_val, WLAN_CRYPTO_KEY_MGMT_NONE);
wlan_crypto_set_vdev_param(vdev,
WLAN_CRYPTO_PARAM_KEY_MGMT,
set_val);
}
if (req->crypto.n_ciphers_pairwise) {
hdd_populate_crypto_cipher_type(req->crypto.ciphers_pairwise[0],
vdev,
WLAN_CRYPTO_PARAM_UCAST_CIPHER);
if (req->crypto.cipher_group)
} else {
/* Reset to none */
HDD_SET_BIT(set_val, WLAN_CRYPTO_CIPHER_NONE);
wlan_crypto_set_vdev_param(vdev,
WLAN_CRYPTO_PARAM_UCAST_CIPHER,
0);
}
if (req->crypto.cipher_group) {
hdd_populate_crypto_cipher_type(req->crypto.cipher_group,
vdev,
WLAN_CRYPTO_PARAM_MCAST_CIPHER);
} else {
/* Reset to none */
HDD_SET_BIT(set_val, WLAN_CRYPTO_CIPHER_NONE);
wlan_crypto_set_vdev_param(vdev,
WLAN_CRYPTO_PARAM_MCAST_CIPHER,
0);
}
}
/**