]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: Set ap_scan to default in case of disassociation
authorJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 11:04:38 +0000 (13:04 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:36:33 +0000 (16:36 +0200)
A rebased version of this AOSP commit:

commit 43007fd3a75a07189a11510e131216284b48e098
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Mon Apr 11 15:58:40 2011 -0700

    Set ap_scan to default in case of disassociation

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
wpa_supplicant/events.c

index 624ed25456be6412c6a32bf056269f22428e1f55..daceadec9ecc9ee0a9d2aa113f8e670ec9dac951 100644 (file)
@@ -160,6 +160,9 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s)
                return;
 
        wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
+#ifdef ANDROID
+       wpa_s->conf->ap_scan = DEFAULT_AP_SCAN;
+#endif
        bssid_changed = !is_zero_ether_addr(wpa_s->bssid);
        os_memset(wpa_s->bssid, 0, ETH_ALEN);
        os_memset(wpa_s->pending_bssid, 0, ETH_ALEN);
@@ -2044,7 +2047,11 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s,
                        fast_reconnect_ssid = wpa_s->current_ssid;
 #endif /* CONFIG_NO_SCAN_PROCESSING */
                } else if (wpa_s->wpa_state >= WPA_ASSOCIATING)
+#ifdef ANDROID
+                       wpa_supplicant_req_scan(wpa_s, 0, 500000);
+#else
                        wpa_supplicant_req_scan(wpa_s, 0, 100000);
+#endif
                else
                        wpa_dbg(wpa_s, MSG_DEBUG, "Do not request new "
                                "immediate scan");