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.
This commit is contained in:
Bill Paul 2005-10-20 16:31:54 +00:00
parent 909537c101
commit e00d94fa7c

View File

@ -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) {