diff --git a/src/wps/wps_er.c b/src/wps/wps_er.c index 51306cb0f..c1ed6b4d3 100644 --- a/src/wps/wps_er.c +++ b/src/wps/wps_er.c @@ -1366,6 +1366,11 @@ void wps_er_set_sel_reg(struct wps_er *er, int sel_reg, u16 dev_passwd_id, struct wpabuf *msg; struct wps_er_ap *ap; + if (er->skip_set_sel_reg) { + wpa_printf(MSG_DEBUG, "WPS ER: Skip SetSelectedRegistrar"); + return; + } + msg = wpabuf_alloc(500); if (msg == NULL) return; @@ -1702,8 +1707,9 @@ int wps_er_learn(struct wps_er *er, const u8 *uuid, const u8 *pin, if (wps_er_send_get_device_info(ap, wps_er_ap_learn_m1) < 0) return -1; - /* TODO: add PIN without SetSelectedRegistrar trigger to all APs */ + er->skip_set_sel_reg = 1; wps_registrar_add_pin(er->wps->registrar, NULL, uuid, pin, pin_len, 0); + er->skip_set_sel_reg = 0; return 0; } @@ -1763,8 +1769,9 @@ int wps_er_config(struct wps_er *er, const u8 *uuid, const u8 *pin, if (wps_er_send_get_device_info(ap, wps_er_ap_config_m1) < 0) return -1; - /* TODO: add PIN without SetSelectedRegistrar trigger to all APs */ + er->skip_set_sel_reg = 1; wps_registrar_add_pin(er->wps->registrar, NULL, uuid, pin, pin_len, 0); + er->skip_set_sel_reg = 0; return 0; } diff --git a/src/wps/wps_er.h b/src/wps/wps_er.h index af07d5ec5..d51bd7025 100644 --- a/src/wps/wps_er.h +++ b/src/wps/wps_er.h @@ -91,6 +91,7 @@ struct wps_er { void (*deinit_done_cb)(void *ctx); void *deinit_done_ctx; struct in_addr filter_addr; + int skip_set_sel_reg; };