diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index a8ab6ae08..8fe5996db 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -795,9 +795,15 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s) if (wpa_s->wps) wps_ie = wpa_supplicant_extra_ies(wpa_s, ¶ms); - wpa_dbg(wpa_s, MSG_DEBUG, - "Starting sched scan: interval %d timeout %d", - wpa_s->sched_scan_interval, wpa_s->sched_scan_timeout); + if (ssid || !wpa_s->first_sched_scan) { + wpa_dbg(wpa_s, MSG_DEBUG, + "Starting sched scan: interval %d (no timeout)", + wpa_s->sched_scan_interval); + } else { + wpa_dbg(wpa_s, MSG_DEBUG, + "Starting sched scan: interval %d timeout %d", + wpa_s->sched_scan_interval, wpa_s->sched_scan_timeout); + } ret = wpa_supplicant_start_sched_scan(wpa_s, ¶ms, wpa_s->sched_scan_interval);