From: Jouni Malinen Date: Mon, 24 Sep 2012 23:55:20 +0000 (+0300) Subject: P2P: Clear sta_scan_pending on group removal X-Git-Tag: hostap_2_0~202 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83218d20ddb95847346665bed0073191d2d7d32d;p=thirdparty%2Fhostap.git 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 --- 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");