]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Clear groups first on FLUSH command
authorJouni Malinen <j@w1.fi>
Wed, 6 Jan 2016 16:49:15 +0000 (18:49 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 6 Jan 2016 16:49:15 +0000 (18:49 +0200)
This is needed to get proper P2P group removal processing for some test
cases. discovery_group_client followed by nfc_p2p_client was able to hit
a case where the P2P group idle timeout survived to the next group
instance because of the FLUSH command not clearing the group and this
timeout properly.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/ctrl_iface.c

index 848f323f07920e5e083a69f04c8b6051e43f067d..b3d62466db20ac4bb931633e96a38a71a557f63b 100644 (file)
@@ -6982,9 +6982,9 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
        }
 
 #ifdef CONFIG_P2P
+       wpas_p2p_group_remove(p2p_wpa_s, "*");
        wpas_p2p_cancel(p2p_wpa_s);
        p2p_ctrl_flush(p2p_wpa_s);
-       wpas_p2p_group_remove(p2p_wpa_s, "*");
        wpas_p2p_service_flush(p2p_wpa_s);
        p2p_wpa_s->global->p2p_disabled = 0;
        p2p_wpa_s->global->p2p_per_sta_psk = 0;