P2P: Fix group formation timeout on GO during WPS step

Commit 361cdf3400 changed the way the
group formation timeout is used on P2P client. However, it resulted in
clearing the timeout on the GO when the GO started beaconing. This is
not correct since the timeout is supposed to be maintained until at
least the completion of the WPS provisioning step. Fix this regression
by clearing the timeout here only in the case we are not GO in group
formation phase.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2012-06-08 18:22:03 +03:00 committed by Jouni Malinen
parent 476dea24ff
commit 73ccd08378

View File

@ -4178,8 +4178,10 @@ void wpas_p2p_completed(struct wpa_supplicant *wpa_s)
int persistent;
int freq;
eloop_cancel_timeout(wpas_p2p_group_formation_timeout, wpa_s->parent,
NULL);
if (ssid == NULL || ssid->mode != WPAS_MODE_P2P_GROUP_FORMATION) {
eloop_cancel_timeout(wpas_p2p_group_formation_timeout,
wpa_s->parent, NULL);
}
if (!wpa_s->show_group_started || !ssid)
return;