From 34dbcde8dfa5b3d152d250b6d69965e001238e49 Mon Sep 17 00:00:00 2001 From: wpaul Date: Thu, 20 Oct 2005 16:31:54 +0000 Subject: Import a fixed version of driver_ndis.c from the vendor. The existing version has a bug where it fails to properly cancel the polling loop that periodically queries the BSSID (this is done to detect the association/disassociation state). The timeout is supposed to fire once a second, but the eloop_cancel_timeout() call uses a different 'user data' value than what was passed to eloop_register_timeout(), so cancelling the timeouts fails. This results in an additional timeout being created each time an EAPOL packet is received, which can lead to dozens of unwanted timeouts firing every second instead of just one. --- contrib/wpa_supplicant/driver_ndis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/wpa_supplicant/driver_ndis.c b/contrib/wpa_supplicant/driver_ndis.c index 678d228..1dba95a 100644 --- a/contrib/wpa_supplicant/driver_ndis.c +++ b/contrib/wpa_supplicant/driver_ndis.c @@ -1023,7 +1023,7 @@ static void wpa_driver_ndis_poll_timeout(void *eloop_ctx, void *timeout_ctx) static void wpa_driver_ndis_poll(void *priv) { struct wpa_driver_ndis_data *drv = priv; - eloop_cancel_timeout(wpa_driver_ndis_poll_timeout, drv, drv->ctx); + eloop_cancel_timeout(wpa_driver_ndis_poll_timeout, drv, NULL); wpa_driver_ndis_poll_timeout(drv, NULL); } @@ -1546,7 +1546,7 @@ static void * wpa_driver_ndis_init(void *ctx, const char *ifname) static void wpa_driver_ndis_deinit(void *priv) { struct wpa_driver_ndis_data *drv = priv; - eloop_cancel_timeout(wpa_driver_ndis_poll_timeout, drv, drv->ctx); + eloop_cancel_timeout(wpa_driver_ndis_poll_timeout, drv, NULL); wpa_driver_ndis_flush_pmkid(drv); wpa_driver_ndis_disconnect(drv); if (wpa_driver_ndis_radio_off(drv) < 0) { -- cgit v1.1