]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/wps_supplicant.c
WPS: Share a common function for error strings
[thirdparty/hostap.git] / wpa_supplicant / wps_supplicant.c
index 8e0207cb8067caf3c72832d7e96fa0c4d7aa0c89..44b935a3a1d3ff009609d5b00f3434c6676a6f12 100644 (file)
@@ -567,12 +567,6 @@ static void wpa_supplicant_wps_event_m2d(struct wpa_supplicant *wpa_s,
 }
 
 
-static const char * wps_event_fail_reason[NUM_WPS_EI_VALUES] = {
-       "No Error", /* WPS_EI_NO_ERROR */
-       "TKIP Only Prohibited", /* WPS_EI_SECURITY_TKIP_ONLY_PROHIBITED */
-       "WEP Prohibited" /* WPS_EI_SECURITY_WEP_PROHIBITED */
-};
-
 static void wpa_supplicant_wps_event_fail(struct wpa_supplicant *wpa_s,
                                          struct wps_event_fail *fail)
 {
@@ -581,13 +575,13 @@ static void wpa_supplicant_wps_event_fail(struct wpa_supplicant *wpa_s,
                wpa_msg(wpa_s, MSG_INFO,
                        WPS_EVENT_FAIL "msg=%d config_error=%d reason=%d (%s)",
                        fail->msg, fail->config_error, fail->error_indication,
-                       wps_event_fail_reason[fail->error_indication]);
+                       wps_ei_str(fail->error_indication));
                if (wpa_s->parent && wpa_s->parent != wpa_s)
                        wpa_msg(wpa_s->parent, MSG_INFO, WPS_EVENT_FAIL
                                "msg=%d config_error=%d reason=%d (%s)",
                                fail->msg, fail->config_error,
                                fail->error_indication,
-                               wps_event_fail_reason[fail->error_indication]);
+                               wps_ei_str(fail->error_indication));
        } else {
                wpa_msg(wpa_s, MSG_INFO,
                        WPS_EVENT_FAIL "msg=%d config_error=%d",