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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id774e2448e75634d5134ee3013859c65976f8d49
diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
index 680d426..6e73b90 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -474,6 +474,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;
 }