From a482883f634ca4fb0e27447cc7758dfdd9862057 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 4 Aug 2010 14:34:56 -0700 Subject: [PATCH] P2P: Fix connect-to-running-group if Action TX status is delayed The following operations (scan and associate) were not run if the Provisioning Discovery Response is received before the TX Action status. --- wpa_supplicant/p2p_supplicant.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 56a04c3dc..a27d58ff8 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -1709,6 +1709,15 @@ void wpas_prov_disc_resp(void *ctx, const u8 *peer, u16 config_methods) else if (config_methods & WPS_CONFIG_PUSHBUTTON) wpa_msg(wpa_s, MSG_INFO, P2P_EVENT_PROV_DISC_PBC_RESP MACSTR, MAC2STR(peer)); + + if (wpa_s->pending_pd_before_join && + (os_memcmp(peer, wpa_s->pending_join_dev_addr, ETH_ALEN) == 0 || + os_memcmp(peer, wpa_s->pending_join_iface_addr, ETH_ALEN) == 0)) { + wpa_s->pending_pd_before_join = 0; + wpa_printf(MSG_DEBUG, "P2P: Starting pending " + "join-existing-group operation"); + wpas_p2p_join_start(wpa_s); + } }