nl80211: Do not ignore disconnection event after a connection event am: d53974f425

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/wpa_supplicant_8/+/13253477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibf44edb46469964e7acb4588662d64471a26e059
diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
index 6a2de1f..1a5f899 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -464,6 +464,13 @@
 		event.assoc_info.fils_pmkid = nla_data(fils_pmkid);
 
 	wpa_supplicant_event(drv->ctx, EVENT_ASSOC, &event);
+
+	/* Avoid a race condition by stopping to ignore any following
+	 * disconnection events now that the driver has indicated it is
+	 * connected since that connection could have been triggered by a roam
+	 * operation that happened in parallel with the disconnection request.
+	 */
+	drv->ignore_next_local_disconnect = 0;
 }