aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hostapd/ctrl_iface.c3
-rw-r--r--src/ap/wps_hostapd.c14
-rw-r--r--src/ap/wps_hostapd.h1
3 files changed, 17 insertions, 1 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index af83b8d..2cdcdc1 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -661,7 +661,7 @@ static int hostapd_ctrl_iface_get_config(struct hostapd_data *hapd,
}
-static int hostapd_ctrl_iface_set(struct hostapd_data *wpa_s, char *cmd)
+static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
{
char *value;
int ret = 0;
@@ -687,6 +687,7 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *wpa_s, char *cmd)
"version %u.%u",
(wps_version_number & 0xf0) >> 4,
wps_version_number & 0x0f);
+ hostapd_wps_update_ie(hapd);
}
} else if (os_strcasecmp(cmd, "wps_testing_dummy_cred") == 0) {
wps_testing_dummy_cred = atoi(value);
diff --git a/src/ap/wps_hostapd.c b/src/ap/wps_hostapd.c
index b2f6a78..7ff9aa0 100644
--- a/src/ap/wps_hostapd.c
+++ b/src/ap/wps_hostapd.c
@@ -1272,3 +1272,17 @@ int hostapd_wps_ap_pin_set(struct hostapd_data *hapd, const char *pin,
data.timeout = timeout;
return hostapd_wps_for_each(hapd, wps_ap_pin_set, &data);
}
+
+
+static int wps_update_ie(struct hostapd_data *hapd, void *ctx)
+{
+ if (hapd->wps)
+ wps_registrar_update_ie(hapd->wps->registrar);
+ return 0;
+}
+
+
+void hostapd_wps_update_ie(struct hostapd_data *hapd)
+{
+ return hostapd_wps_for_each(hapd, wps_update_ie, NULL);
+}
diff --git a/src/ap/wps_hostapd.h b/src/ap/wps_hostapd.h
index b9d525a..fac736b 100644
--- a/src/ap/wps_hostapd.h
+++ b/src/ap/wps_hostapd.h
@@ -33,6 +33,7 @@ const char * hostapd_wps_ap_pin_random(struct hostapd_data *hapd, int timeout);
const char * hostapd_wps_ap_pin_get(struct hostapd_data *hapd);
int hostapd_wps_ap_pin_set(struct hostapd_data *hapd, const char *pin,
int timeout);
+void hostapd_wps_update_ie(struct hostapd_data *hapd);
#else /* CONFIG_WPS */