فهرست منبع

qcacld-3.0: Assert host driver if no key is found

Currently, when host driver attempting to send the keys
during a link switch, the absence of a key was not handled,
resulting in firmware crashes.
This change is to assert  host driver in the event that
no key is found during a link switch.

Change-Id: I7abe452c7dfa1e203c6af563163cf2d5589ab929
CRs-Fixed: 3604274
Aasir Rasheed 1 سال پیش
والد
کامیت
8a4816478e
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 7 0
      components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

+ 7 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -1678,6 +1678,7 @@ cm_install_link_vdev_keys(struct wlan_objmgr_vdev *vdev)
 	bool pairwise;
 	uint8_t vdev_id;
 	uint8_t link_id;
+	bool key_present = false;
 	uint16_t max_key_index = WLAN_CRYPTO_MAXKEYIDX +
 				 WLAN_CRYPTO_MAXIGTKKEYIDX +
 				 WLAN_CRYPTO_MAXBIGTKKEYIDX;
@@ -1709,6 +1710,12 @@ cm_install_link_vdev_keys(struct wlan_objmgr_vdev *vdev)
 			  vdev_id, link_id, i, pairwise);
 		mlme_cm_osif_send_keys(vdev, i, pairwise,
 				       crypto_key->cipher_type);
+		key_present = true;
+	}
+
+	if (!key_present && mlo_mgr_is_link_switch_in_progress(vdev)) {
+		mlme_err("No key found for link_id %d", link_id);
+		QDF_BUG(0);
 	}
 	mlo_defer_set_keys(vdev, link_id, false);
 }