qcacmn: Fix WEP functionality in converged set key

Fix WEP security mode issues in converged set key.

Change-Id: Idd4071c8aef141cb45db9006c5773a94b352879a
CRs-Fixed: 2400864
This commit is contained in:
Varun Reddy Yeturu
2019-02-15 16:04:36 -08:00
committed by nshrivas
parent 0e2d7fc5ad
commit 09a3b065f9
4 changed files with 31 additions and 6 deletions

View File

@@ -182,6 +182,8 @@ QDF_STATUS target_if_crypto_set_key(struct wlan_objmgr_vdev *vdev,
switch (req->cipher_type) {
case WLAN_CRYPTO_CIPHER_WEP:
case WLAN_CRYPTO_CIPHER_WEP_40:
case WLAN_CRYPTO_CIPHER_WEP_104:
def_tx_idx = wlan_crypto_get_default_key_idx(vdev, false);
if (pairwise && params.key_idx == def_tx_idx)
params.key_flags |= TX_USAGE;
@@ -203,6 +205,7 @@ QDF_STATUS target_if_crypto_set_key(struct wlan_objmgr_vdev *vdev,
params.key_len = req->keylen;
if (peer) {
/* Set PN check & security type in data path */
qdf_mem_copy(&pn[0], &params.key_rsc_ctr, sizeof(pn));
cdp_set_pn_check(soc, txrx_vdev, peer, sec_type, pn);
cdp_set_key(soc, peer, pairwise, (uint32_t *)(req->keyval +
WLAN_CRYPTO_IV_SIZE + WLAN_CRYPTO_MIC_LEN));