The duplicated WPS event in the parent interface should only be used
during P2P group formation, i.e., when the WPS operation was actually
started using the parent interface. When authorizing a client to
connect to an already running group, the WPS command is issued on
the group interface and there is no need to duplicate the event to
the parent interface.
static void ap_wps_event_cb(void *ctx, enum wps_event event,
union wps_event_data *data)
{
+#ifdef CONFIG_P2P
struct wpa_supplicant *wpa_s = ctx;
- if (event == WPS_EV_FAIL && wpa_s->parent && wpa_s->parent != wpa_s) {
+ if (event == WPS_EV_FAIL && wpa_s->parent && wpa_s->parent != wpa_s &&
+ wpa_s == wpa_s->global->p2p_group_formation) {
struct wps_event_fail *fail = &data->fail;
/*
"msg=%d config_error=%d",
fail->msg, fail->config_error);
}
+#endif /* CONFIG_P2P */
}