void hostapd_wps_eap_completed(struct hostapd_data *hapd) { /* * Reduce race condition of the station trying to reconnect immediately * after AP reconfiguration through WPS by rescheduling the reload * timeout to happen after EAP completion rather than the originally * scheduled 100 ms after new configuration became known. */ if (eloop_deplete_timeout(0, 0, wps_reload_config, hapd->iface, NULL) == 1) wpa_printf(MSG_DEBUG, "WPS: Reschedule immediate configuration reload"); }
/** * wpa_supplicant_req_scan - Schedule a scan for neighboring access points * @wpa_s: Pointer to wpa_supplicant data * @sec: Number of seconds after which to scan * @usec: Number of microseconds after which to scan * * This function is used to schedule a scan for neighboring access points after * the specified time. */ void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec) { if (eloop_deplete_timeout(sec, usec, wpa_supplicant_scan, wpa_s, NULL)) { wpa_dbg(wpa_s, MSG_DEBUG, "Rescheduling scan request: %d sec %d usec", sec, usec); return; } wpa_dbg(wpa_s, MSG_DEBUG, "Setting scan request: %d sec %d usec", sec, usec); eloop_cancel_timeout(wpa_supplicant_scan, wpa_s, NULL); eloop_register_timeout(sec, usec, wpa_supplicant_scan, wpa_s, NULL); }
/** * wpa_supplicant_req_scan - Schedule a scan for neighboring access points * @wpa_s: Pointer to wpa_supplicant data * @sec: Number of seconds after which to scan * @usec: Number of microseconds after which to scan * * This function is used to schedule a scan for neighboring access points after * the specified time. */ void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec) { int res = eloop_deplete_timeout(sec, usec, wpa_supplicant_scan, wpa_s, NULL); if (res == 1) { wpa_dbg(wpa_s, MSG_DEBUG, "Rescheduling scan request: %d.%06d sec", sec, usec); } else if (res == 0) { wpa_dbg(wpa_s, MSG_DEBUG, "Ignore new scan request for %d.%06d sec since an earlier request is scheduled to trigger sooner", sec, usec); } else { wpa_dbg(wpa_s, MSG_DEBUG, "Setting scan request: %d.%06d sec", sec, usec); eloop_register_timeout(sec, usec, wpa_supplicant_scan, wpa_s, NULL); } }