]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Short scan wait to speed up the group re-invocation
authorRashmi Ramanna <c_ramanr@qti.qualcomm.com>
Tue, 12 Nov 2013 14:17:35 +0000 (19:47 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 20 Nov 2013 14:35:30 +0000 (16:35 +0200)
The shorter 250 ms wait for the next scan request can be used also for
the case of persistent group re-invocation instead of just formation of
a new group. This speeds up the process and makes this more robust
especially in cases where the GO is using MCC.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

wpa_supplicant/events.c
wpa_supplicant/p2p_supplicant.c

index b70e1fb71307c60b5d56ba32f77eb4fe80bbe882..35712e58e2c3af8833b25404ac9deff8a4107fbe 100644 (file)
@@ -1353,10 +1353,12 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
                        if (wpas_p2p_scan_no_go_seen(wpa_s) == 1)
                                return 0;
 
-                       if (wpa_s->p2p_in_provisioning) {
+                       if (wpa_s->p2p_in_provisioning ||
+                           wpa_s->show_group_started) {
                                /*
                                 * Use shorter wait during P2P Provisioning
-                                * state to speed up group formation.
+                                * state and during P2P join-a-group operation
+                                * to speed up group formation.
                                 */
                                timeout_sec = 0;
                                timeout_usec = 250000;
index 963a0b806e297528c2d886cf3e61607de55d5049..fecc25936c69c6bc1e13cac54f8a1c517edf287b 100644 (file)
@@ -4774,10 +4774,10 @@ static int wpas_start_p2p_client(struct wpa_supplicant *wpa_s,
        if (params->passphrase)
                ssid->passphrase = os_strdup(params->passphrase);
 
-       wpa_supplicant_select_network(wpa_s, ssid);
-
        wpa_s->show_group_started = 1;
 
+       wpa_supplicant_select_network(wpa_s, ssid);
+
        return 0;
 }