summaryrefslogtreecommitdiff
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-08-21 18:40:23 +0300
committerJouni Malinen <j@w1.fi>2015-08-22 00:22:12 +0300
commit941cd3ec7042438ac98ae48212340238173275f9 (patch)
tree7f649521d10de107b7b1d6a810162db00b60f367 /wpa_supplicant
parentdfaf11d648fb131237dfe1df80d8537d5cce92fb (diff)
downloadhostap-941cd3ec7042438ac98ae48212340238173275f9.tar.gz
P2P: Request fresh scan results after GO Negotiation
The P2P group is not yet operating when going through GO Negotiation exchange. Previously, an old cached scan result could be used to skip the scan immediately after the GO Negotiation. While this is quite unlikely to happen in practice, we can easily force a scan here now with the generic scan_min_time mechanism. Do that to avoid any corner cases that a previous instance of the group could have if found in cached scan results. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/p2p_supplicant.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 2633ccaf2..d1e7bae1e 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -2171,18 +2171,22 @@ static void wpas_go_neg_completed(void *ctx, struct p2p_go_neg_results *res)
wpa_s->pending_interface_name[0] = '\0';
group_wpa_s->p2p_in_provisioning = 1;
- if (res->role_go)
+ if (res->role_go) {
wpas_start_wps_go(group_wpa_s, res, 1);
- else
+ } else {
+ os_get_reltime(&group_wpa_s->scan_min_time);
wpas_start_wps_enrollee(group_wpa_s, res);
+ }
} else {
wpa_s->p2p_in_provisioning = 1;
wpa_s->global->p2p_group_formation = wpa_s;
- if (res->role_go)
+ if (res->role_go) {
wpas_start_wps_go(wpa_s, res, 1);
- else
+ } else {
+ os_get_reltime(&wpa_s->scan_min_time);
wpas_start_wps_enrollee(ctx, res);
+ }
}
wpa_s->p2p_long_listen = 0;