From adeb4f59a22e73f0f0560ba6340a39b2e1d089e8 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 5 Oct 2013 22:15:28 -0700 Subject: [PATCH] P2P: Make sure wait for the first client gets stopped If a group was removed before the wait for the first client had timed out and the client had not yet connected, p2p_go_wait_client could have been left set and with that, scan operations could be unnecessarily delayed. This fixes some undesired delays from commit c1c0b35fea656345b672984910cc3b93938bc5e5. Signed-hostap: Jouni Malinen --- wpa_supplicant/p2p_supplicant.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 109cc80ce..4b54a63fa 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -423,6 +423,12 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s, wpa_s->p2p_in_provisioning = 0; } + /* + * Make sure wait for the first client does not remain active after the + * group has been removed. + */ + wpa_s->global->p2p_go_wait_client.sec = 0; + if (removal_reason != P2P_GROUP_REMOVAL_SILENT && ssid) wpas_notify_p2p_group_removed(wpa_s, ssid, gtype);