Explorar el Código

qcacld-3.0: Avoid link VDEV key install for open mode

If connected in open mode, supplicant will not sent any
crypto keys so during link switch driver will not find any keys.
Currently driver panics if there isn't any key installed during
link switch but this is not applicable if the auth mode is open.

Don't check for keys to install if the current auth mode is open.

Change-Id: I6e0ed587f3e1e214eb6f65556de9aab4c09507dc
CRs-Fixed: 3651819
Vinod Kumar Pirla hace 1 año
padre
commit
fa4c3646f1

+ 12 - 2
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -1666,11 +1666,11 @@ static void
 cm_install_link_vdev_keys(struct wlan_objmgr_vdev *vdev)
 {
 	struct wlan_crypto_key *crypto_key;
+	struct wlan_crypto_params *crypto_params;
 	enum QDF_OPMODE op_mode;
 	uint16_t i;
 	bool pairwise;
-	uint8_t vdev_id;
-	uint8_t link_id;
+	uint8_t vdev_id, link_id;
 	bool key_present = false;
 	uint16_t max_key_index = WLAN_CRYPTO_MAXKEYIDX +
 				 WLAN_CRYPTO_MAXIGTKKEYIDX +
@@ -1685,6 +1685,16 @@ cm_install_link_vdev_keys(struct wlan_objmgr_vdev *vdev)
 	    !wlan_vdev_mlme_is_mlo_link_vdev(vdev))
 		return;
 
+	crypto_params = wlan_crypto_vdev_get_crypto_params(vdev);
+	if (!crypto_params) {
+		mlme_err("crypto params is null");
+		return;
+	}
+
+	if (!crypto_params->ucastcipherset ||
+	    QDF_HAS_PARAM(crypto_params->ucastcipherset, WLAN_CRYPTO_CIPHER_NONE))
+		return;
+
 	link_id = wlan_vdev_get_link_id(vdev);
 
 	if (!mlo_is_set_key_defered(vdev, link_id) &&