Do not trigger the scan during initialization on Android platforms

Android framework maintains a state to process the scan results after
the scan is issued. If wpa_supplicant issues the scan during the
initialization, the one issued by the framework may fail (with EBUSY) if
the host driver is already processing the scan. Thus, the scan results
returned for the first scan triggered by wpa_supplicant are not
processed for getting displayed resulting in delay for the display of
the first scan results after the Wi-Fi subsystem initialization. Thus,
trigger the scan only based on the framework request on Android.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Sunil Dutt 2014-12-17 12:47:10 +05:30 committed by Jouni Malinen
parent 83e80d32f1
commit ee82e33d6a

View file

@ -2931,12 +2931,14 @@ int wpa_supplicant_driver_init(struct wpa_supplicant *wpa_s)
wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED); wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
interface_count = 0; interface_count = 0;
} }
#ifndef ANDROID
if (!wpa_s->p2p_mgmt && if (!wpa_s->p2p_mgmt &&
wpa_supplicant_delayed_sched_scan(wpa_s, wpa_supplicant_delayed_sched_scan(wpa_s,
interface_count % 3, interface_count % 3,
100000)) 100000))
wpa_supplicant_req_scan(wpa_s, interface_count % 3, wpa_supplicant_req_scan(wpa_s, interface_count % 3,
100000); 100000);
#endif /* ANDROID */
interface_count++; interface_count++;
} else } else
wpa_supplicant_set_state(wpa_s, WPA_INACTIVE); wpa_supplicant_set_state(wpa_s, WPA_INACTIVE);