From 5ecc1e1ae83895c3adb11138e9fbf4ceede44503 Mon Sep 17 00:00:00 2001 From: bings Date: Tue, 2 Jun 2020 18:09:37 +0800 Subject: [PATCH] qcacmn: set key as valid after wlan_crypto_save_key For wep mode, when key is received from cfg80211, wlan_crypto_save_key is called to save the key, then wlan_crypto_default_key is called to save default key id. key should be valid when save default key id. set key as valid after wlan_crypto_save_key Change-Id: Ic13e311593154911ee21db5172188c7037f429a3 CRs-Fixed: 2654882 --- umac/cmn_services/crypto/src/wlan_crypto_global_api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/umac/cmn_services/crypto/src/wlan_crypto_global_api.c b/umac/cmn_services/crypto/src/wlan_crypto_global_api.c index 33bba51cf3c1..29790833f9aa 100644 --- a/umac/cmn_services/crypto/src/wlan_crypto_global_api.c +++ b/umac/cmn_services/crypto/src/wlan_crypto_global_api.c @@ -3394,6 +3394,8 @@ QDF_STATUS wlan_crypto_set_peer_wep_keys(struct wlan_objmgr_vdev *vdev, cipher_table = (struct wlan_crypto_cipher *) key->cipher_table; + if (!cipher_table) + continue; if (cipher_table->cipher == WLAN_CRYPTO_CIPHER_WEP) { tx_ops = wlan_psoc_get_lmac_if_txops(psoc); if (!tx_ops) { @@ -4328,6 +4330,7 @@ QDF_STATUS wlan_crypto_save_key(struct wlan_objmgr_vdev *vdev, key_index - WLAN_CRYPTO_MAXKEYIDX - WLAN_CRYPTO_MAXIGTKKEYIDX; } + crypto_key->valid = true; return QDF_STATUS_SUCCESS; }