aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorSaurav Babu <saurav.babu@samsung.com>2015-05-28 03:53:06 (GMT)
committerJouni Malinen <j@w1.fi>2015-09-27 09:47:47 (GMT)
commit893e2cf9611cb9b31c480edc88443c5262f9c42c (patch)
treedb2dc22605743dbff7adbceff9ed3ac8b8227944 /wpa_supplicant/wps_supplicant.c
parent55b4cc6dd7321878707ef28fd1cd61b0fe81d24d (diff)
downloadhostap-893e2cf9611cb9b31c480edc88443c5262f9c42c.zip
hostap-893e2cf9611cb9b31c480edc88443c5262f9c42c.tar.gz
hostap-893e2cf9611cb9b31c480edc88443c5262f9c42c.tar.bz2
D-Bus: Add signal to notify WPS timeout event
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 2db7914..e612ca3 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -955,8 +955,20 @@ static void wpas_clear_wps(struct wpa_supplicant *wpa_s)
static void wpas_wps_timeout(void *eloop_ctx, void *timeout_ctx)
{
struct wpa_supplicant *wpa_s = eloop_ctx;
+ union wps_event_data data;
+
wpa_msg(wpa_s, MSG_INFO, WPS_EVENT_TIMEOUT "Requested operation timed "
"out");
+ os_memset(&data, 0, sizeof(data));
+ data.fail.config_error = WPS_CFG_MSG_TIMEOUT;
+ data.fail.error_indication = WPS_EI_NO_ERROR;
+ /*
+ * Call wpas_notify_wps_event_fail() directly instead of through
+ * wpa_supplicant_wps_event() which would end up registering unnecessary
+ * timeouts (those are only for the case where the failure happens
+ * during an EAP-WSC exchange).
+ */
+ wpas_notify_wps_event_fail(wpa_s, &data.fail);
wpas_clear_wps(wpa_s);
}