return;
#ifdef CONFIG_WPS_ER
- wps_er_deinit(wpa_s->wps_er);
+ wps_er_deinit(wpa_s->wps_er, NULL, NULL);
wpa_s->wps_er = NULL;
#endif /* CONFIG_WPS_ER */
int wpas_wps_er_stop(struct wpa_supplicant *wpa_s)
{
#ifdef CONFIG_WPS_ER
- wps_er_deinit(wpa_s->wps_er);
+ wps_er_deinit(wpa_s->wps_er, NULL, NULL);
wpa_s->wps_er = NULL;
#endif /* CONFIG_WPS_ER */
return 0;
return wps_er_learn(wpa_s->wps_er, u, (const u8 *) pin,
os_strlen(pin));
}
+
+
+static void wpas_wps_terminate_cb(void *ctx)
+{
+ wpa_printf(MSG_DEBUG, "WPS ER: Terminated");
+ eloop_terminate();
+}
+#endif /* CONFIG_WPS_ER */
+
+
+int wpas_wps_terminate_pending(struct wpa_supplicant *wpa_s)
+{
+#ifdef CONFIG_WPS_ER
+ if (wpa_s->wps_er) {
+ wps_er_deinit(wpa_s->wps_er, wpas_wps_terminate_cb, wpa_s);
+ wpa_s->wps_er = NULL;
+ return 1;
+ }
#endif /* CONFIG_WPS_ER */
+ return 0;
+}