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
c1c0b35fea.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-10-05 22:15:28 -07:00
parent f22f274bbf
commit adeb4f59a2

View file

@ -423,6 +423,12 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s,
wpa_s->p2p_in_provisioning = 0; 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) if (removal_reason != P2P_GROUP_REMOVAL_SILENT && ssid)
wpas_notify_p2p_group_removed(wpa_s, ssid, gtype); wpas_notify_p2p_group_removed(wpa_s, ssid, gtype);