]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Replace wpas_wps_in_progress with identical wpas_wps_searching
authorJouni Malinen <j@w1.fi>
Sun, 29 Dec 2013 15:59:12 +0000 (17:59 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 29 Dec 2013 15:59:12 +0000 (17:59 +0200)
There is no point in maintaining two different functions that do
practically the same check of WPS state.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/scan.c
wpa_supplicant/wps_supplicant.c
wpa_supplicant/wps_supplicant.h

index 372685718d85c0c6d0f3a48f56ff3f076d492e49..34c430fabd3bb12f73442b31fab6a600efaadbe3 100644 (file)
@@ -1630,7 +1630,7 @@ wpa_supplicant_get_scan_results(struct wpa_supplicant *wpa_s,
        filter_scan_res(wpa_s, scan_res);
 
 #ifdef CONFIG_WPS
-       if (wpas_wps_in_progress(wpa_s)) {
+       if (wpas_wps_searching(wpa_s)) {
                wpa_dbg(wpa_s, MSG_DEBUG, "WPS: Order scan results with WPS "
                        "provisioning rules");
                compar = wpa_scan_result_wps_compar;
index 7ff05d708c67c8543e4249ec5ab16d76795bee61..fc4ffde2ee02392ec9c8412d96743b58836a18b9 100644 (file)
@@ -1934,19 +1934,6 @@ int wpas_wps_terminate_pending(struct wpa_supplicant *wpa_s)
 }
 
 
-int wpas_wps_in_progress(struct wpa_supplicant *wpa_s)
-{
-       struct wpa_ssid *ssid;
-
-       for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) {
-               if (!ssid->disabled && ssid->key_mgmt == WPA_KEY_MGMT_WPS)
-                       return 1;
-       }
-
-       return 0;
-}
-
-
 void wpas_wps_update_config(struct wpa_supplicant *wpa_s)
 {
        struct wps_context *wps = wpa_s->wps;
index 2a212caba399dbb9aae98c3fba2f0031749e426a..3fcfbbe190f691fd416c72dc41411ad865eb676c 100644 (file)
@@ -60,7 +60,6 @@ int wpas_wps_er_config(struct wpa_supplicant *wpa_s, const char *uuid,
 struct wpabuf * wpas_wps_er_nfc_config_token(struct wpa_supplicant *wpa_s,
                                             int ndef, const char *uuid);
 int wpas_wps_terminate_pending(struct wpa_supplicant *wpa_s);
-int wpas_wps_in_progress(struct wpa_supplicant *wpa_s);
 void wpas_wps_update_config(struct wpa_supplicant *wpa_s);
 struct wpabuf * wpas_wps_nfc_config_token(struct wpa_supplicant *wpa_s,
                                          int ndef, const char *id_str);