]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Use common code for disabled network case in sched_scan
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 28 Nov 2011 16:09:37 +0000 (18:09 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 28 Nov 2011 16:09:37 +0000 (18:09 +0200)
There is no need to implement two copies of the iteration code here.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

wpa_supplicant/scan.c

index 6d519010a85b29f5a3be9410105ab32bb458bbcd..8aa554e1c1faa90f629b58ca856569adbe01c626 100644 (file)
@@ -749,11 +749,8 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
        }
 
        while (ssid) {
-               if (ssid->disabled) {
-                       wpa_s->prev_sched_ssid = ssid;
-                       ssid = ssid->next;
-                       continue;
-               }
+               if (ssid->disabled)
+                       goto next;
 
                if (params.num_filter_ssids < wpa_s->max_match_sets &&
                    params.filter_ssids && ssid->ssid && ssid->ssid_len) {
@@ -788,6 +785,7 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
                        }
                }
 
+       next:
                wpa_s->prev_sched_ssid = ssid;
                ssid = ssid->next;
        }