OSDN Git Service

WEXT: Suppress additional DISASSOCIATE events
authorDmitry Shmidt <dimitrysh@google.com>
Tue, 23 Feb 2010 20:31:30 +0000 (12:31 -0800)
committerDmitry Shmidt <dimitrysh@google.com>
Tue, 23 Feb 2010 20:31:30 +0000 (12:31 -0800)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
wpa_supplicant/src/drivers/driver_wext.c
wpa_supplicant/src/drivers/driver_wext.h

index b531d01..327c44c 100644 (file)
@@ -535,10 +535,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;
-                               wpa_supplicant_event(ctx, EVENT_DISASSOC,
+#ifdef ANDROID
+                               if (!drv->skip_disconnect) {
+                                       drv->skip_disconnect = 1;
+#endif
+                                       wpa_supplicant_event(ctx, EVENT_DISASSOC,
                                                     NULL);
+#ifdef ANDROID
+                               }
+#endif
                        
                        } else {
+#ifdef ANDROID
+                               drv->skip_disconnect = 0;
+#endif
                                wpa_driver_wext_event_assoc_ies(drv);
                                wpa_supplicant_event(ctx, EVENT_ASSOC, NULL);
                        }
@@ -955,6 +965,7 @@ void * wpa_driver_wext_init(void *ctx, const char *ifname)
 #ifdef ANDROID
        drv->errors = 0;
        drv->driver_is_loaded = TRUE;
+       drv->skip_disconnect = 0;
 #endif
        wpa_driver_wext_finish_drv_init(drv);
 
index 63b61c3..f6b76a9 100644 (file)
@@ -46,6 +46,7 @@ struct wpa_driver_wext_data {
 #ifdef ANDROID
        int errors;
        int driver_is_loaded;
+       int skip_disconnect;
 #endif
 };