]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Clear sta_scan_pending on group removal
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 24 Sep 2012 23:55:20 +0000 (02:55 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 24 Sep 2012 23:55:20 +0000 (02:55 +0300)
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 <jouni@qca.qualcomm.com>

wpa_supplicant/p2p_supplicant.c

index 6abdd684b2545bd66b494b0f19e71e8b58aa99ea..089f109fa2dc6de31a5079a447a0ffea1898333b 100644 (file)
@@ -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");