wpa_supplicant: Update to Version 0.8.27 from BRCM

- Fix crash during TRUE pbc overlap
- Fix p2p_stop_find event
- Avoid race condition in GO-NEG process if both peers enter
  p2p_connect at the same time
- Retry assoc immediately on ASSOC-REJECT. Previously assoc was
  retried on authentication timeout (which occurs after 10secs).
  Now on assoc reject, we cancel the auth timer and then initiate
  a assoc scan.

BUG: 6543705, 6427094

Change-Id: I4489fb14b6cead069f0d14fcbb9e2224f790d77b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index c6d91e8..e729e82 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2262,6 +2262,25 @@
 				data->assoc_reject.status_code);
 		if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
 			sme_event_assoc_reject(wpa_s, data);
+#ifdef ANDROID_P2P
+		/* If assoc reject is reported by the driver, then avoid
+		 * waiting for  the authentication timeout. Cancel the
+		 * authentication timeout and retry the assoc.
+		 */
+		if(wpa_s->assoc_retries++ < 5) {
+			wpa_printf(MSG_ERROR, "Retrying assoc "
+			"Iteration:%d", wpa_s->assoc_retries);
+			wpa_supplicant_cancel_auth_timeout(wpa_s);
+
+			/* Clear the states */
+			wpa_sm_notify_disassoc(wpa_s->wpa);
+			wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
+
+			wpa_s->reassociate = 1;
+			wpa_supplicant_req_scan(wpa_s, 1, 0);
+		} else
+			wpa_s->assoc_retries = 0;
+#endif /* ANDROID_P2P */
 		break;
 	case EVENT_AUTH_TIMED_OUT:
 		if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)