aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>2005-10-20 16:31:54 +0000
committerBill Paul <wpaul@FreeBSD.org>2005-10-20 16:31:54 +0000
commite00d94fa7cb16ece7a61c444a75fef8ff3926446 (patch)
tree03113f970a94acd34d130c12372c761772949090
parent909537c1010084d48e4d72875235cb91a8cdbd9c (diff)
downloadsrc-e00d94fa7cb16ece7a61c444a75fef8ff3926446.tar.gz
src-e00d94fa7cb16ece7a61c444a75fef8ff3926446.zip
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.
Notes
Notes: svn path=/vendor/wpa_supplicant/dist/; revision=151513
-rw-r--r--contrib/wpa_supplicant/driver_ndis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/wpa_supplicant/driver_ndis.c b/contrib/wpa_supplicant/driver_ndis.c
index 678d228a1614..1dba95adcc18 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) {