mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Restart PNO/sched_scan on channel list update
As the scan channels might need to change when the channel list has been updated by the kernel. Use the simulated sched_scan timeout (wpas_scan_restart_sched_scan()) to handle a possible race where an ongoing sched_scan has stopped asynchronously while trying to restart a new sched_scan. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
This commit is contained in:
parent
746e5c2565
commit
ebf59eb549
@ -3219,14 +3219,16 @@ static void wpa_supplicant_update_channel_list(
|
|||||||
free_hw_features(ifs);
|
free_hw_features(ifs);
|
||||||
ifs->hw.modes = wpa_drv_get_hw_feature_data(
|
ifs->hw.modes = wpa_drv_get_hw_feature_data(
|
||||||
ifs, &ifs->hw.num_modes, &ifs->hw.flags);
|
ifs, &ifs->hw.num_modes, &ifs->hw.flags);
|
||||||
}
|
|
||||||
|
|
||||||
/* Restart sched_scan with updated channel list */
|
/* Restart PNO/sched_scan with updated channel list */
|
||||||
if (wpa_s->sched_scanning) {
|
if (ifs->pno) {
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
wpas_stop_pno(ifs);
|
||||||
"Channel list changed restart sched scan.");
|
wpas_start_pno(ifs);
|
||||||
wpa_supplicant_cancel_sched_scan(wpa_s);
|
} else if (ifs->sched_scanning && !ifs->pno_sched_pending) {
|
||||||
wpa_supplicant_req_scan(wpa_s, 0, 0);
|
wpa_dbg(ifs, MSG_DEBUG,
|
||||||
|
"Channel list changed - restart sched_scan");
|
||||||
|
wpas_scan_restart_sched_scan(ifs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wpas_p2p_update_channel_list(wpa_s, WPAS_P2P_CHANNEL_UPDATE_DRIVER);
|
wpas_p2p_update_channel_list(wpa_s, WPAS_P2P_CHANNEL_UPDATE_DRIVER);
|
||||||
|
Loading…
Reference in New Issue
Block a user