]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Clear p2p_group_formation and p2p_in_provisioning on group removal
authorDeepthi Gowri <c_gowri@qti.qualcomm.com>
Sun, 6 Oct 2013 00:54:52 +0000 (17:54 -0700)
committerJouni Malinen <j@w1.fi>
Sun, 6 Oct 2013 00:54:52 +0000 (17:54 -0700)
Commit 41f853235fe1d1fad1acecc0ee5dfe81c872c6b2 extends group formation
timeout for the first data connection to complete and resets
p2p_go_group_formation_completed flag due to which p2p_in_provisioning
and p2p_group_formation flags are not cleared when
wpas_group_formation_completed() is called. This can result in both
station scan and p2p_find failures in the case where separate P2P group
interface is not used and the client does not complete 4-way handshake.
Fix this by clearing p2p_group_formation and p2p_in_provisioning when
such a P2P group is deleted.

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

wpa_supplicant/p2p_supplicant.c

index 29de880c56884bee429c887b19e7679e43f05ed7..aec069b34c0e008ba12464a9e04a710ba2759c07 100644 (file)
@@ -443,6 +443,11 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s,
                return 1;
        }
 
+       if (!wpa_s->p2p_go_group_formation_completed) {
+               wpa_s->global->p2p_group_formation = NULL;
+               wpa_s->p2p_in_provisioning = 0;
+       }
+
        wpa_printf(MSG_DEBUG, "P2P: Remove temporary group network");
        if (ssid && (ssid->p2p_group ||
                     ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION ||