Browse Source

qcacld-3.0: Set key_cipher to process BIP check on RMF frames

If CRYPTO_SET_KEY_CONVERGED is enabled, the iface->key.key_cipher
is not set but is used to process multicast and broadcast
management frame.

Set iface->key.key_cipher with proper value when
CRYPTO_SET_KEY_CONVERGED is enabled.

Change-Id: I67d8bfe2210f4aad499830c4339de10c620d604d
CRs-Fixed: 2444420
Abhishek Singh 6 years ago
parent
commit
5be0e03800
1 changed files with 10 additions and 3 deletions
  1. 10 3
      core/wma/src/wma_features.c

+ 10 - 3
core/wma/src/wma_features.c

@@ -5711,14 +5711,21 @@ void wma_update_set_key(uint8_t session_id, bool pairwise,
 	if (!iface)
 		wma_info("iface not found for session id %d", session_id);
 
-	wma_reset_ipn(iface, key_index);
+	if (cipher_type == WLAN_CRYPTO_CIPHER_AES_GMAC ||
+	    cipher_type == WLAN_CRYPTO_CIPHER_AES_GMAC_256 ||
+	    cipher_type == WLAN_CRYPTO_CIPHER_AES_CMAC)
+		iface->key.key_cipher =
+			wlan_crypto_cipher_to_wmi_cipher(cipher_type);
+
+	if (iface) {
+		wma_reset_ipn(iface, key_index);
+		iface->is_waiting_for_key = false;
+	}
 	if (!pairwise && iface) {
 		/* Its GTK release the wake lock */
 		wma_debug("Release set key wake lock");
 		wma_release_wakelock(&iface->vdev_set_key_wakelock);
 	}
-	if (iface)
-		iface->is_waiting_for_key = false;
 
 	wma_send_set_key_rsp(session_id, pairwise, key_index);
 }