mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
PNO: Change sched_scan_stopped event to handle pending PNO properly
When a sched_scan_stopped event is received and there is a pending PNO, it used regular scheduled scan parameters instead of PNO specific parameters. Change it by calling wpas_start_pno(). Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
737e7a08b0
commit
5e3ddf4d23
@ -3379,15 +3379,11 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||||||
* Start a new sched scan to continue searching for more SSIDs
|
* Start a new sched scan to continue searching for more SSIDs
|
||||||
* either if timed out or PNO schedule scan is pending.
|
* either if timed out or PNO schedule scan is pending.
|
||||||
*/
|
*/
|
||||||
if (wpa_s->sched_scan_timed_out || wpa_s->pno_sched_pending) {
|
if (wpa_s->sched_scan_timed_out) {
|
||||||
|
wpa_supplicant_req_sched_scan(wpa_s);
|
||||||
if (wpa_supplicant_req_sched_scan(wpa_s) < 0 &&
|
} else if (wpa_s->pno_sched_pending) {
|
||||||
wpa_s->pno_sched_pending) {
|
wpa_s->pno_sched_pending = 0;
|
||||||
wpa_msg(wpa_s, MSG_ERROR, "Failed to schedule PNO");
|
wpas_start_pno(wpa_s);
|
||||||
} else if (wpa_s->pno_sched_pending) {
|
|
||||||
wpa_s->pno_sched_pending = 0;
|
|
||||||
wpa_s->pno = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1822,6 +1822,9 @@ int wpas_start_pno(struct wpa_supplicant *wpa_s)
|
|||||||
struct wpa_ssid *ssid;
|
struct wpa_ssid *ssid;
|
||||||
struct wpa_driver_scan_params params;
|
struct wpa_driver_scan_params params;
|
||||||
|
|
||||||
|
if (!wpa_s->sched_scan_supported)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (wpa_s->pno || wpa_s->pno_sched_pending)
|
if (wpa_s->pno || wpa_s->pno_sched_pending)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -1894,6 +1897,8 @@ int wpas_start_pno(struct wpa_supplicant *wpa_s)
|
|||||||
os_free(params.filter_ssids);
|
os_free(params.filter_ssids);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
wpa_s->pno = 1;
|
wpa_s->pno = 1;
|
||||||
|
else
|
||||||
|
wpa_msg(wpa_s, MSG_ERROR, "Failed to schedule PNO");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1902,11 +1907,12 @@ int wpas_stop_pno(struct wpa_supplicant *wpa_s)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (wpa_s->pno || wpa_s->sched_scanning) {
|
if (!wpa_s->pno)
|
||||||
wpa_s->pno = 0;
|
return 0;
|
||||||
ret = wpa_supplicant_stop_sched_scan(wpa_s);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
ret = wpa_supplicant_stop_sched_scan(wpa_s);
|
||||||
|
|
||||||
|
wpa_s->pno = 0;
|
||||||
wpa_s->pno_sched_pending = 0;
|
wpa_s->pno_sched_pending = 0;
|
||||||
|
|
||||||
if (wpa_s->wpa_state == WPA_SCANNING)
|
if (wpa_s->wpa_state == WPA_SCANNING)
|
||||||
|
Loading…
Reference in New Issue
Block a user