浏览代码

qcacmn: Prevent FILS delkey from calling CRYPTO_OPS

Prevent delkey to call crypto_ops for FILS cipher
type, as this keys are not present in FW.

Change-Id: Ica13a62b6822ee3cee40acffa98b7cc1cb122120
CRs-Fixed: 2520517
Ashok Kumar 5 年之前
父节点
当前提交
39c0fea7c7
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      umac/cmn_services/crypto/src/wlan_crypto_global_api.c

+ 5 - 1
umac/cmn_services/crypto/src/wlan_crypto_global_api.c

@@ -1095,9 +1095,13 @@ QDF_STATUS wlan_crypto_delkey(struct wlan_objmgr_vdev *vdev,
 		cipher_table = (struct wlan_crypto_cipher *)key->cipher_table;
 		qdf_mem_zero(key->keyval, sizeof(key->keyval));
 
-		if (WLAN_CRYPTO_TX_OPS_DELKEY(psoc)) {
+		if (!IS_FILS_CIPHER(cipher_table->cipher) &&
+		    WLAN_CRYPTO_TX_OPS_DELKEY(psoc)) {
 			WLAN_CRYPTO_TX_OPS_DELKEY(psoc)(vdev, key,
 						macaddr, cipher_table->cipher);
+		} else if (IS_FILS_CIPHER(cipher_table->cipher)) {
+			if (key->private)
+				qdf_mem_free(key->private);
 		}
 	}
 	qdf_mem_free(key);