]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Android: wext: Suppress additional DISASSOCIATE events
authorDmitry Shmidt <dimitrysh@google.com>
Fri, 25 Nov 2011 20:00:43 +0000 (22:00 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 24 Nov 2013 20:46:38 +0000 (22:46 +0200)
Change-Id: Id65428908bca59e71a3ab479b63d992eff96e433
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
src/drivers/driver_wext.c
src/drivers/driver_wext.h

index 1dacaf5d3d965b692a8538d029eb71bb07531c64..32ed82c64b4be2076fbc4505e4ae1313026e9101 100644 (file)
@@ -483,10 +483,20 @@ static void wpa_driver_wext_event_wireless(struct wpa_driver_wext_data *drv,
                                drv->assoc_req_ies = NULL;
                                os_free(drv->assoc_resp_ies);
                                drv->assoc_resp_ies = NULL;
+#ifdef ANDROID
+                               if (!drv->skip_disconnect) {
+                                       drv->skip_disconnect = 1;
+#endif /* ANDROID */
                                wpa_supplicant_event(drv->ctx, EVENT_DISASSOC,
                                                     NULL);
+#ifdef ANDROID
+                               }
+#endif /* ANDROID */
                        
                        } else {
+#ifdef ANDROID
+                               drv->skip_disconnect = 0;
+#endif /* ANDROID */
                                wpa_driver_wext_event_assoc_ies(drv);
                                wpa_supplicant_event(drv->ctx, EVENT_ASSOC,
                                                     NULL);
@@ -866,6 +876,7 @@ void * wpa_driver_wext_init(void *ctx, const char *ifname)
 #ifdef ANDROID
        drv->errors = 0;
        drv->driver_is_started = TRUE;
+       drv->skip_disconnect = 0;
        drv->bgscan_enabled = 0;
 #endif /* ANDROID */
 
@@ -2063,6 +2074,10 @@ int wpa_driver_wext_associate(void *priv,
 
        wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
 
+#ifdef ANDROID
+       drv->skip_disconnect = 0;
+#endif /* ANDROID */
+
        if (drv->cfg80211) {
                /*
                 * Stop cfg80211 from trying to associate before we are done
index c4a5bc99c80393b20c11b2b0c9ca18095695e16a..7e0b28b6bfa37a184146e69cd2d85d23975e23d0 100644 (file)
@@ -48,6 +48,7 @@ struct wpa_driver_wext_data {
 #ifdef ANDROID
        int errors;
        int driver_is_started;
+       int skip_disconnect;
        int bgscan_enabled;
 #endif /* ANDROID */
 };