wpa_supplicant/scan.c
void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec)
{
	int res;

	if (wpa_s->p2p_mgmt) {
		wpa_dbg(wpa_s, MSG_DEBUG,
			"Ignore scan request (%d.%06d sec) on p2p_mgmt interface",
			sec, usec);
		return;
	}

	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);
	}
}
/**
 * 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.
 */
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.
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;
	if (wpa_s->p2p_mgmt) {
		wpa_dbg(wpa_s, MSG_DEBUG,
			"Ignore scan request (%d.%06d sec) on p2p_mgmt interface",
			sec, usec);
		return;
	}
	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);
	}
}
void wpa_supplicant_req_scan ( struct wpa_supplicant * wpa_s , int sec , int usec ) { int res ; if ( wpa_s -> p2p_mgmt ) { wpa_dbg ( wpa_s , MSG_DEBUG , " " , sec , usec ) ; return ; } res = eloop_deplete_timeout ( sec , usec , wpa_supplicant_scan , wpa_s , NULL ) ; if ( res == 1 ) { wpa_dbg ( wpa_s , MSG_DEBUG , " " , sec , usec ) ; } else if ( res == 0 ) { wpa_dbg ( wpa_s , MSG_DEBUG , " " , sec , usec ) ; } else { wpa_dbg ( wpa_s , MSG_DEBUG , " " , sec , usec ) ; 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
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