From 6ceea4c3cb829360c3846c4d31237d058d3a7b99 Mon Sep 17 00:00:00 2001 From: Victor Goldenshtein Date: Thu, 19 Mar 2015 16:41:39 +0200 Subject: [PATCH] Restart sched_scan on channel list change The channel list can be changed as a result of arriving beacon hints during normal scan or as a result of local Reg-Domain change. Some passive channels can become active and needs to be reconfigured accordingly for the scheduled scan. This fixes the connection to hidden SSIDs on 5 GHz band during default Reg-Domain 00 (world roaming). Signed-off-by: Victor Goldenshtein Signed-off-by: Eliad Peller --- wpa_supplicant/events.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index d275ca424..45edec6e1 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2864,6 +2864,14 @@ static void wpa_supplicant_update_channel_list( ifs, &ifs->hw.num_modes, &ifs->hw.flags); } } + + /* Restart sched_scan with updated channel list */ + if (wpa_s->sched_scanning) { + wpa_dbg(wpa_s, MSG_DEBUG, + "Channel list changed restart sched scan."); + wpa_supplicant_cancel_sched_scan(wpa_s); + wpa_supplicant_req_scan(wpa_s, 0, 0); + } }