]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Cancel group formation on PBC overlap
authorSudhakar Swaminathan <Sudhakar.Swaminathan@Atheros.com>
Fri, 17 Dec 2010 13:04:14 +0000 (15:04 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 17 Dec 2010 13:04:14 +0000 (15:04 +0200)
We should cancel group formation completely on PBC overlap instead
of just partially notifying that operations were stopped. There is
no point in waiting for the group formation timeout in this case.

wpa_supplicant/p2p_supplicant.c

index 248d9f14c584fbf59fd9402b0a6355b02df90ddc..94f8cec1a402d70732bbdbdc0b38b439613183f6 100644 (file)
@@ -3914,6 +3914,13 @@ int wpas_p2p_notif_pbc_overlap(struct wpa_supplicant *wpa_s)
                   "session overlap");
        if (wpa_s != wpa_s->parent)
                wpa_msg_ctrl(wpa_s->parent, MSG_INFO, WPS_EVENT_OVERLAP);
+
+       if (wpa_s->global->p2p)
+               p2p_group_formation_failed(wpa_s->global->p2p);
+
+       eloop_cancel_timeout(wpas_p2p_group_formation_timeout,
+                            wpa_s->parent, NULL);
+
        wpas_group_formation_completed(wpa_s, 0);
        return 1;
 }