Use sched_scan in driver init
This patch uses sched_scan, if available, when the driver is initialized. It also adds a couple of cancel operations where appropriate. Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
d21c63b925
commit
a4cba8f1e2
3 changed files with 13 additions and 3 deletions
|
@ -996,10 +996,14 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
|
||||||
*/
|
*/
|
||||||
timeout_sec = 0;
|
timeout_sec = 0;
|
||||||
timeout_usec = 250000;
|
timeout_usec = 250000;
|
||||||
|
wpa_supplicant_req_new_scan(wpa_s, timeout_sec,
|
||||||
|
timeout_usec);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
wpa_supplicant_req_new_scan(wpa_s, timeout_sec,
|
if (wpa_supplicant_req_sched_scan(wpa_s))
|
||||||
timeout_usec);
|
wpa_supplicant_req_new_scan(wpa_s, timeout_sec,
|
||||||
|
timeout_usec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -237,6 +237,7 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
wpa_supplicant_cancel_sched_scan(wpa_s);
|
||||||
wpa_supplicant_cancel_scan(wpa_s);
|
wpa_supplicant_cancel_scan(wpa_s);
|
||||||
|
|
||||||
wpa_msg(wpa_s, MSG_INFO, "SME: Trying to authenticate with " MACSTR
|
wpa_msg(wpa_s, MSG_INFO, "SME: Trying to authenticate with " MACSTR
|
||||||
|
|
|
@ -446,6 +446,8 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
|
||||||
offchannel_deinit(wpa_s);
|
offchannel_deinit(wpa_s);
|
||||||
#endif /* CONFIG_OFFCHANNEL */
|
#endif /* CONFIG_OFFCHANNEL */
|
||||||
|
|
||||||
|
wpa_supplicant_cancel_sched_scan(wpa_s);
|
||||||
|
|
||||||
os_free(wpa_s->next_scan_freqs);
|
os_free(wpa_s->next_scan_freqs);
|
||||||
wpa_s->next_scan_freqs = NULL;
|
wpa_s->next_scan_freqs = NULL;
|
||||||
|
|
||||||
|
@ -1176,6 +1178,7 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
|
||||||
wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
|
wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
|
||||||
os_memset(wpa_s->pending_bssid, 0, ETH_ALEN);
|
os_memset(wpa_s->pending_bssid, 0, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
wpa_supplicant_cancel_sched_scan(wpa_s);
|
||||||
wpa_supplicant_cancel_scan(wpa_s);
|
wpa_supplicant_cancel_scan(wpa_s);
|
||||||
|
|
||||||
/* Starting new association, so clear the possibly used WPA IE from the
|
/* Starting new association, so clear the possibly used WPA IE from the
|
||||||
|
@ -2087,7 +2090,9 @@ int wpa_supplicant_driver_init(struct wpa_supplicant *wpa_s)
|
||||||
|
|
||||||
wpa_s->prev_scan_ssid = WILDCARD_SSID_SCAN;
|
wpa_s->prev_scan_ssid = WILDCARD_SSID_SCAN;
|
||||||
if (wpa_supplicant_enabled_networks(wpa_s->conf)) {
|
if (wpa_supplicant_enabled_networks(wpa_s->conf)) {
|
||||||
wpa_supplicant_req_scan(wpa_s, interface_count, 100000);
|
if (wpa_supplicant_req_sched_scan(wpa_s))
|
||||||
|
wpa_supplicant_req_scan(wpa_s, interface_count,
|
||||||
|
100000);
|
||||||
interface_count++;
|
interface_count++;
|
||||||
} else
|
} else
|
||||||
wpa_supplicant_set_state(wpa_s, WPA_INACTIVE);
|
wpa_supplicant_set_state(wpa_s, WPA_INACTIVE);
|
||||||
|
|
Loading…
Reference in a new issue