Write reason for scan only_new_results into debug log

This can be helpful in figuring out why the driver was requested to
flush its scan results prior to starting a new scan.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-01-17 13:54:16 +02:00
parent a4a15cf1f9
commit 2dbe63ad53

View file

@ -168,8 +168,11 @@ static void wpas_trigger_scan_cb(struct wpa_radio_work *work, int deinit)
wpa_supplicant_notify_scanning(wpa_s, 1); wpa_supplicant_notify_scanning(wpa_s, 1);
if (wpa_s->clear_driver_scan_cache) if (wpa_s->clear_driver_scan_cache) {
wpa_printf(MSG_DEBUG,
"Request driver to clear scan cache due to local BSS flush");
params->only_new_results = 1; params->only_new_results = 1;
}
ret = wpa_drv_scan(wpa_s, params); ret = wpa_drv_scan(wpa_s, params);
wpa_scan_free_params(params); wpa_scan_free_params(params);
work->ctx = NULL; work->ctx = NULL;
@ -876,8 +879,11 @@ ssid_list_set:
extra_ie = wpa_supplicant_extra_ies(wpa_s); extra_ie = wpa_supplicant_extra_ies(wpa_s);
if (wpa_s->last_scan_req == MANUAL_SCAN_REQ && if (wpa_s->last_scan_req == MANUAL_SCAN_REQ &&
wpa_s->manual_scan_only_new) wpa_s->manual_scan_only_new) {
wpa_printf(MSG_DEBUG,
"Request driver to clear scan cache due to manual only_new=1 scan");
params.only_new_results = 1; params.only_new_results = 1;
}
if (wpa_s->last_scan_req == MANUAL_SCAN_REQ && params.freqs == NULL && if (wpa_s->last_scan_req == MANUAL_SCAN_REQ && params.freqs == NULL &&
wpa_s->manual_scan_freqs) { wpa_s->manual_scan_freqs) {