From 83218d20ddb95847346665bed0073191d2d7d32d Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 25 Sep 2012 02:55:20 +0300 Subject: [PATCH] P2P: Clear sta_scan_pending on group removal It is possible for the P2P client group to be removed while waiting for a pending scan operation (e.g., when p2p_group_idle timeout hits after getting disconnected from the GO with something else than Deauthentication with reason code 3). If this happens with a P2P interface that is used both for P2P Device and group roles, scan state could get stuck while waiting for the next scan to complete since no more station (P2P client) mode scans are scheduled. Fix this by clearing sta_scan_pending when removing the temporary group network block. Signed-hostap: Jouni Malinen --- wpa_supplicant/p2p_supplicant.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 6abdd684b..089f109fa 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -360,6 +360,7 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s, wpa_config_remove_network(wpa_s->conf, id); wpa_supplicant_clear_status(wpa_s); wpa_supplicant_cancel_sched_scan(wpa_s); + wpa_s->sta_scan_pending = 0; } else { wpa_printf(MSG_DEBUG, "P2P: Temporary group network not " "found");