P2P: Avoid concurrent scans during all steps of group formation

Previously, only some P2P states were considered to postpone concurrent
station mode scans during group formation. Especially the WPS
provisioning step was skipped due to issues to scans run on the P2P
client interface (see commit fc6997b345).
This is not ideal since a concurrent scan can slow down group formation
considerably and potentially make it time out. Enforce p2p-in-progress
through all steps of group formation on another interface to address
this.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-02-11 12:21:03 +02:00 committed by Jouni Malinen
parent 77dfafd07d
commit ec01d5f6b0

View file

@ -5359,10 +5359,29 @@ int wpas_p2p_disconnect(struct wpa_supplicant *wpa_s)
int wpas_p2p_in_progress(struct wpa_supplicant *wpa_s)
{
int ret;
if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL)
return 0;
return p2p_in_progress(wpa_s->global->p2p);
ret = p2p_in_progress(wpa_s->global->p2p);
if (ret == 0) {
/*
* Check whether there is an ongoing WPS provisioning step (or
* other parts of group formation) on another interface since
* p2p_in_progress() does not report this to avoid issues for
* scans during such provisioning step.
*/
if (wpa_s->global->p2p_group_formation &&
wpa_s->global->p2p_group_formation != wpa_s) {
wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Another interface (%s) "
"in group formation",
wpa_s->global->p2p_group_formation->ifname);
ret = 1;
}
}
return ret;
}