]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/scan.c
Remove old mechanism of skipping scan request rescheduling
[thirdparty/hostap.git] / wpa_supplicant / scan.c
index 10287d4ef17f3cdb5771fd0522bfd5e58d37141f..6d679d2c47f627cbbd7ddd1612cd560edaf9fce2 100644 (file)
@@ -656,8 +656,9 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
 #ifdef CONFIG_P2P
        if ((wpa_s->p2p_in_provisioning || wpa_s->show_group_started) &&
            wpa_s->go_params) {
-               wpa_printf(MSG_DEBUG, "P2P: Use specific SSID for scan during "
-                          "P2P group formation");
+               wpa_printf(MSG_DEBUG, "P2P: Use specific SSID for scan during P2P group formation (p2p_in_provisioning=%d show_group_started=%d)",
+                          wpa_s->p2p_in_provisioning,
+                          wpa_s->show_group_started);
                params.ssids[0].ssid = wpa_s->go_params->ssid;
                params.ssids[0].ssid_len = wpa_s->go_params->ssid_len;
                params.num_ssids = 1;
@@ -906,27 +907,11 @@ void wpa_supplicant_update_scan_int(struct wpa_supplicant *wpa_s, int sec)
  */
 void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec)
 {
-       /* If there's at least one network that should be specifically scanned
-        * then don't cancel the scan and reschedule.  Some drivers do
-        * background scanning which generates frequent scan results, and that
-        * causes the specific SSID scan to get continually pushed back and
-        * never happen, which causes hidden APs to never get probe-scanned.
-        */
-       if (eloop_is_timeout_registered(wpa_supplicant_scan, wpa_s, NULL) &&
-           wpa_s->conf->ap_scan == 1) {
-               struct wpa_ssid *ssid = wpa_s->conf->ssid;
-
-               while (ssid) {
-                       if (!wpas_network_disabled(wpa_s, ssid) &&
-                           ssid->scan_ssid)
-                               break;
-                       ssid = ssid->next;
-               }
-               if (ssid) {
-                       wpa_dbg(wpa_s, MSG_DEBUG, "Not rescheduling scan to "
-                               "ensure that specific SSID scans occur");
-                       return;
-               }
+       if (eloop_deplete_timeout(sec, usec, wpa_supplicant_scan, wpa_s, NULL))
+       {
+               wpa_dbg(wpa_s, MSG_DEBUG, "Rescheduling scan request: %d sec %d usec",
+                       sec, usec);
+               return;
        }
 
        wpa_dbg(wpa_s, MSG_DEBUG, "Setting scan request: %d sec %d usec",