From f65a239ba4760cc6e8a169d21a4fcabed444a90b Mon Sep 17 00:00:00 2001 From: Deepthi Gowri Date: Tue, 17 Apr 2012 19:44:13 +0300 Subject: [PATCH] P2P: Add provision discovery failure event Add provisional discovery failure ctrl_iface event (P2P-PROV-DISC-FAILURE) to indicate to the application layer in case of PD failure. Signed-off-by: Deepthi Gowri --- src/common/wpa_ctrl.h | 2 ++ wpa_supplicant/p2p_supplicant.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index 35012e86b..2da58c962 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -116,6 +116,8 @@ extern "C" { #define P2P_EVENT_PROV_DISC_PBC_REQ "P2P-PROV-DISC-PBC-REQ " /* parameters: */ #define P2P_EVENT_PROV_DISC_PBC_RESP "P2P-PROV-DISC-PBC-RESP " +/* parameters: */ +#define P2P_EVENT_PROV_DISC_FAILURE "P2P-PROV-DISC-FAILURE" /* parameters: */ #define P2P_EVENT_SERV_DISC_REQ "P2P-SERV-DISC-REQ " /* parameters: */ diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index b2b72ddc5..d5c862c50 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -1852,6 +1852,10 @@ static void wpas_prov_disc_fail(void *ctx, const u8 *peer, { struct wpa_supplicant *wpa_s = ctx; + wpa_msg(wpa_s, MSG_INFO, P2P_EVENT_PROV_DISC_FAILURE + " p2p_dev_addr=" MACSTR " status=%d", + MAC2STR(wpa_s->global->p2p_dev_addr), status); + wpas_notify_p2p_provision_discovery(wpa_s, peer, 0 /* response */, status, 0, 0); }