aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2011-11-25 20:00:43 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-24 20:46:38 (GMT)
commita3057941fd8be11e8f5e0b409105cfb8cc42fb8b (patch)
tree49c0003e0f2e8b9569eeb06db5b77ed4f9c006f1
parent35c3caff4259dbe8a222169e5e939089c29a7af1 (diff)
downloadhostap-a3057941fd8be11e8f5e0b409105cfb8cc42fb8b.zip
hostap-a3057941fd8be11e8f5e0b409105cfb8cc42fb8b.tar.gz
hostap-a3057941fd8be11e8f5e0b409105cfb8cc42fb8b.tar.bz2
Android: wext: Suppress additional DISASSOCIATE events
Change-Id: Id65428908bca59e71a3ab479b63d992eff96e433 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--src/drivers/driver_wext.c15
-rw-r--r--src/drivers/driver_wext.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index 1dacaf5..32ed82c 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -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
diff --git a/src/drivers/driver_wext.h b/src/drivers/driver_wext.h
index c4a5bc9..7e0b28b 100644
--- a/src/drivers/driver_wext.h
+++ b/src/drivers/driver_wext.h
@@ -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 */
};