OSDN Git Service

Restore STA reconnection behavior
authorIrfan Sheriff <isheriff@google.com>
Mon, 18 Jun 2012 16:39:07 +0000 (09:39 -0700)
committerDmitry Shmidt <dimitrysh@google.com>
Wed, 8 Aug 2012 17:26:53 +0000 (10:26 -0700)
Have the customized retry behavior only for P2P & do group failure indication
beyond 5 retries

Bug: b/6674338, b/6910598
Change-Id: I58cba356ebdb7fc4eaa9bedfa417b7d5d35bb306

Conflicts:

wpa_supplicant/events.c

wpa_supplicant/events.c

index c4b3862..451bfd4 100644 (file)
@@ -2383,8 +2383,8 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
                        sme_event_assoc_reject(wpa_s, data);
 #ifdef ANDROID_P2P
-               else {
-
+#ifdef CONFIG_P2P
+               else if (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) {
                        if(!wpa_s->current_ssid) {
                                wpa_printf(MSG_ERROR, "current_ssid == NULL");
                                break;
@@ -2410,13 +2410,12 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                                 */
                                wpa_printf(MSG_ERROR, "Assoc retry threshold reached. "
                                "Disabling the network");
+                               wpa_s->current_ssid->assoc_retry = 0;
                                wpa_supplicant_disable_network(wpa_s, wpa_s->current_ssid);
-#ifdef CONFIG_P2P
-                               if(wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE)
-                                       wpas_p2p_group_remove(wpa_s, wpa_s->ifname);
-#endif
+                               wpas_p2p_group_remove(wpa_s, wpa_s->ifname);
                        }
                }
+#endif
 #endif /* ANDROID_P2P */
                break;
        case EVENT_AUTH_TIMED_OUT: