From: Dmitry Shmidt Date: Fri, 25 Nov 2011 20:00:43 +0000 (+0200) Subject: Android: wext: Suppress additional DISASSOCIATE events X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a3057941fd8be11e8f5e0b409105cfb8cc42fb8b;p=thirdparty%2Fhostap.git Android: wext: Suppress additional DISASSOCIATE events Change-Id: Id65428908bca59e71a3ab479b63d992eff96e433 Signed-off-by: Dmitry Shmidt --- diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c index 1dacaf5d3..32ed82c64 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 c4a5bc99c..7e0b28b6b 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 */ };