]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Do not delay retries on failure during group formation
authorSean Lin <seanlin@qca.qualcomm.com>
Wed, 31 Jul 2013 20:09:34 +0000 (23:09 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 31 Jul 2013 20:09:34 +0000 (23:09 +0300)
4-way handshake may fail under extremely noisy environment and if this
happens during P2P group formation, the 10 second extra delay added in
wpas_auth_failed() can result in running over the 15 second timeout.

Avoid this by skipping the delay mechanism in wpas_auth_failed() for the
P2P group formation case. The P2P formation timeout will take care of
stopping the attempts if the failure condition does not get resolved.

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

wpa_supplicant/wpa_supplicant.c

index bcb5ae949fa516512633da33b8890bf7e6df70ff..a18922a28a8f3e622c69795674f95fa8bd7cbe66 100644 (file)
@@ -3804,6 +3804,18 @@ void wpas_auth_failed(struct wpa_supplicant *wpa_s)
                return;
 
        ssid->auth_failures++;
+
+#ifdef CONFIG_P2P
+       if (ssid->p2p_group &&
+           (wpa_s->p2p_in_provisioning || wpa_s->show_group_started)) {
+               /*
+                * Skip the wait time since there is a short timeout on the
+                * connection to a P2P group.
+                */
+               return;
+       }
+#endif /* CONFIG_P2P */
+
        if (ssid->auth_failures > 50)
                dur = 300;
        else if (ssid->auth_failures > 20)