if (wpa_s->wps == NULL)
return;
+#ifdef CONFIG_WPS_ER
+ wps_er_deinit(wpa_s->wps_er);
+ wpa_s->wps_er = NULL;
+#endif /* CONFIG_WPS_ER */
+
wps_registrar_deinit(wpa_s->wps->registrar);
wpabuf_free(wpa_s->wps->dh_pubkey);
wpabuf_free(wpa_s->wps->dh_privkey);
os_free(wpa_s->wps->network_key);
os_free(wpa_s->wps);
wpa_s->wps = NULL;
-
-#ifdef CONFIG_WPS_ER
- wps_er_deinit(wpa_s->wps_er);
- wpa_s->wps_er = NULL;
-#endif /* CONFIG_WPS_ER */
}
return wps_registrar_add_pin(wpa_s->wps->registrar, any ? NULL : u,
(const u8 *) pin, os_strlen(pin), 300);
}
+
+
+int wpas_wps_er_pbc(struct wpa_supplicant *wpa_s, const char *uuid)
+{
+ u8 u[UUID_LEN];
+
+ if (uuid_str2bin(uuid, u))
+ return -1;
+ return wps_er_pbc(wpa_s->wps_er, u);
+}
+
+
+int wpas_wps_er_learn(struct wpa_supplicant *wpa_s, const char *uuid,
+ const char *pin)
+{
+ u8 u[UUID_LEN];
+
+ if (uuid_str2bin(uuid, u))
+ return -1;
+ return wps_er_learn(wpa_s->wps_er, u, (const u8 *) pin,
+ os_strlen(pin));
+}
#endif /* CONFIG_WPS_ER */