wpa_supplicant(hidl): Add timedOut param in assoc reject

This is needed to indicate if the association failed due to
a timeout instead of AP explicitly rejecting us.

While there,
Fixed the callback sent for disconnect. This is handled similarly in
framework today, so didn't detect this.

Bug: 34280407
Test: Compiles
Change-Id: If5d1483110bca5b23639c3a4be89b2ee3a2d1638
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 448615e..bc3c90e 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3806,6 +3806,7 @@
 				data->assoc_reject.timed_out ? " timeout" : "",
 				buf);
 		wpa_s->assoc_status_code = data->assoc_reject.status_code;
+		wpa_s->assoc_timed_out = data->assoc_reject.timed_out;
 		wpas_notify_assoc_status_code(wpa_s);
 		if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
 			sme_event_assoc_reject(wpa_s, data);
diff --git a/wpa_supplicant/hidl/hidl_manager.cpp b/wpa_supplicant/hidl/hidl_manager.cpp
index 703bf25..cfc65da 100644
--- a/wpa_supplicant/hidl/hidl_manager.cpp
+++ b/wpa_supplicant/hidl/hidl_manager.cpp
@@ -922,7 +922,8 @@
 	    wpa_s->ifname,
 	    std::bind(
 		&ISupplicantStaIfaceCallback::onAssociationRejected,
-		std::placeholders::_1, bssid, wpa_s->assoc_status_code));
+		std::placeholders::_1, bssid, wpa_s->assoc_status_code,
+		wpa_s->assoc_timed_out == 1));
 }
 
 void HidlManager::notifyAuthTimeout(struct wpa_supplicant *wpa_s)
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index fa0d2b7..395be3d 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -1004,6 +1004,8 @@
 
 	/* WLAN_STATUS_* status codes from (Re)Association Response frame. */
 	u16 assoc_status_code;
+	/* Indicates if the previous association request timed out. */
+	u8 assoc_timed_out;
 
 	struct ext_password_data *ext_pw;