wpa_supplicant: Don't trigger auto-connect on failure

When the |auto_reconnect_disabled| flag is set, don't attempt to
blacklist and trigger a new connection attempt on failure.

Bug: 70839791
Test: Device boots up & connects to wifi networks.
Test: Will send for regression tests.
Change-Id: Iaabc4848683cc5213868c819f84eb1cd9af01dab
Signed-off-by: Roshan Pius <rpius@google.com>
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 857fb35..f3e7d01 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -6611,6 +6611,11 @@
 			"disconnected state");
 		return;
 	}
+	if (wpa_s->auto_reconnect_disabled) {
+		wpa_dbg(wpa_s, MSG_DEBUG, "Ignore connection failure "
+			"indication since auto connect is disabled");
+		return;
+	}
 
 	/*
 	 * Add the failed BSSID into the blacklist and speed up next scan