Ver código fonte

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
bings 5 anos atrás
pai
commit
5ecc1e1ae8

+ 3 - 0
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;
 }