Restart sched_scan on channel list change
authorVictor Goldenshtein <victorg@ti.com>
Thu, 19 Mar 2015 14:41:39 +0000 (16:41 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 20 Mar 2015 13:56:59 +0000 (15:56 +0200)
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 <victorg@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wpa_supplicant/events.c

index d275ca4..45edec6 100644 (file)
@@ -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);
+       }
 }