WPS: Fix local configuration update after AP configuration
[wpasupplicant] / wpa_supplicant / wps_supplicant.c
index e6607c0..a4efc6e 100644 (file)
@@ -20,6 +20,7 @@
 #include "config.h"
 #include "eap_peer/eap.h"
 #include "wpa_supplicant_i.h"
+#include "driver_i.h"
 #include "eloop.h"
 #include "uuid.h"
 #include "wpa_ctrl.h"
@@ -209,6 +210,16 @@ static int wpa_supplicant_wps_cred(void *ctx,
        if (wpa_s->conf->wps_cred_processing == 1)
                return 0;
 
+       wpa_hexdump_ascii(MSG_DEBUG, "WPS: SSID", cred->ssid, cred->ssid_len);
+       wpa_printf(MSG_DEBUG, "WPS: Authentication Type 0x%x",
+                  cred->auth_type);
+       wpa_printf(MSG_DEBUG, "WPS: Encryption Type 0x%x", cred->encr_type);
+       wpa_printf(MSG_DEBUG, "WPS: Network Key Index %d", cred->key_idx);
+       wpa_hexdump_key(MSG_DEBUG, "WPS: Network Key",
+                       cred->key, cred->key_len);
+       wpa_printf(MSG_DEBUG, "WPS: MAC Address " MACSTR,
+                  MAC2STR(cred->mac_addr));
+
        if (cred->auth_type != WPS_AUTH_OPEN &&
            cred->auth_type != WPS_AUTH_SHARED &&
            cred->auth_type != WPS_AUTH_WPAPSK &&
@@ -563,7 +574,7 @@ int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
 
 #ifdef CONFIG_WPS_OOB
 int wpas_wps_start_oob(struct wpa_supplicant *wpa_s, char *device_type,
-                      char *path, char *method)
+                      char *path, char *method, char *name)
 {
        struct wps_context *wps = wpa_s->wps;
        struct oob_device_data *oob_dev;
@@ -572,6 +583,7 @@ int wpas_wps_start_oob(struct wpa_supplicant *wpa_s, char *device_type,
        if (oob_dev == NULL)
                return -1;
        oob_dev->device_path = path;
+       oob_dev->device_name = name;
        wps->oob_conf.oob_method = wps_get_oob_method(method);
 
        if (wps->oob_conf.oob_method == OOB_METHOD_DEV_PWD_E) {