Revert "Cumulative patch from commit 4ec1fd8e42bad9390f14a58225b6e5f6fb691950"
This reverts commit 78a5dac804c22aa6e4ec8226a864d3b0d6ccddbb.
Test: None
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 172772d..60e7b68 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1256,8 +1256,6 @@
if (max_sched_scan_ssids < 1 || wpa_s->conf->disable_scan_offload)
return -1;
- wpa_s->sched_scan_stop_req = 0;
-
if (wpa_s->sched_scanning) {
wpa_dbg(wpa_s, MSG_DEBUG, "Already sched scanning");
return 0;
@@ -1556,9 +1554,6 @@
if (!wpa_s->sched_scanning)
return;
- if (wpa_s->sched_scanning)
- wpa_s->sched_scan_stop_req = 1;
-
wpa_dbg(wpa_s, MSG_DEBUG, "Cancelling sched scan");
eloop_cancel_timeout(wpa_supplicant_sched_scan_timeout, wpa_s, NULL);
wpa_supplicant_stop_sched_scan(wpa_s);
@@ -1618,13 +1613,7 @@
*/
const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie)
{
- size_t ie_len = res->ie_len;
-
- /* Use the Beacon frame IEs if res->ie_len is not available */
- if (!ie_len)
- ie_len = res->beacon_ie_len;
-
- return get_ie((const u8 *) (res + 1), ie_len, ie);
+ return get_ie((const u8 *) (res + 1), res->ie_len, ie);
}
@@ -2183,10 +2172,8 @@
}
#endif /* CONFIG_WPS */
- if (scan_res->res) {
- qsort(scan_res->res, scan_res->num,
- sizeof(struct wpa_scan_res *), compar);
- }
+ qsort(scan_res->res, scan_res->num, sizeof(struct wpa_scan_res *),
+ compar);
dump_scan_res(scan_res);
wpa_bss_update_start(wpa_s);
@@ -2428,13 +2415,6 @@
}
}
- if (wpa_s->sched_scan_stop_req) {
- wpa_printf(MSG_DEBUG,
- "Schedule PNO after previous sched scan has stopped");
- wpa_s->pno_sched_pending = 1;
- return 0;
- }
-
os_memset(¶ms, 0, sizeof(params));
num_ssid = num_match_ssid = 0;
@@ -2550,7 +2530,6 @@
return 0;
ret = wpa_supplicant_stop_sched_scan(wpa_s);
- wpa_s->sched_scan_stop_req = 1;
wpa_s->pno = 0;
wpa_s->pno_sched_pending = 0;