]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix fallback to GO Negotiation to avoid PD-before-join timeout
authorAarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Wed, 20 Jun 2012 18:38:31 +0000 (21:38 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 20 Jun 2012 18:38:31 +0000 (21:38 +0300)
The wpas_p2p_pd_before_join_timeout could be left behind if the PD
Request in p2p_connect-auto case does not succeed. This timeout can
result in unexpected operations since it could trigger join operation
while going through GO Negotiation. Fix this by canceling the timeout
when falling back to GO Negotiation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

wpa_supplicant/p2p_supplicant.c

index 199bed98d2245b8e6240fc050747ebfdea487761..ec13f02731e72ce13d84779990e16fb34e49e335 100644 (file)
@@ -4879,6 +4879,7 @@ static void wpas_p2p_fallback_to_go_neg(struct wpa_supplicant *wpa_s,
                                        int group_added)
 {
        struct wpa_supplicant *group = wpa_s;
+       eloop_cancel_timeout(wpas_p2p_pd_before_join_timeout, wpa_s, NULL);
        if (wpa_s->global->p2p_group_formation)
                group = wpa_s->global->p2p_group_formation;
        wpa_s = wpa_s->parent;