Ver Fonte

qcacld-3.0: clear obsolete keys before connect start

Freeing keys in scheduler thread may cause race condition,
to avoid that, clear the obsolete keys before starting a
new connection in wpa_supplicant context.

Change-Id: Ibeecadb117bca8f88ce5dc052bcebe92423ace22
CRs-Fixed: 2872831
Yu Wang há 4 anos atrás
pai
commit
028a1d9bd2

+ 1 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -19655,6 +19655,7 @@ static void hdd_populate_crypto_params(struct wlan_objmgr_vdev *vdev,
 	}
 
 	hdd_populate_crypto_auth_type(vdev, req);
+	wlan_crypto_free_vdev_key(vdev);
 }
 
 #ifdef FEATURE_WLAN_WAPI

+ 0 - 1
core/hdd/src/wlan_hdd_cm_disconnect.c

@@ -155,7 +155,6 @@ void __hdd_cm_disconnect_handler_post_user_update(struct hdd_adapter *adapter)
 	if (adapter->device_mode == QDF_STA_MODE) {
 		vdev = hdd_objmgr_get_vdev_by_user(adapter, WLAN_OSIF_ID);
 		if (vdev) {
-			wlan_crypto_free_vdev_key(vdev);
 			wlan_crypto_reset_vdev_params(vdev);
 			hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID);
 		}