]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Reduce latency on starting WPS negotiation (TX EAPOL-Start earlier)
authorJouni Malinen <j@w1.fi>
Mon, 23 Feb 2009 18:59:27 +0000 (20:59 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 23 Feb 2009 18:59:27 +0000 (20:59 +0200)
Reduce startWhen from 3 to 1 second if WPS is included in the build.
While this is done regardless of runtime WPS configuration, it is fine
to use a smaller value here in general. This cuts two seconds out from
WPS negotiation if the driver does not support addition of WPS IE into
the (Re)Association Request frame.

src/eapol_supp/eapol_supp_sm.c

index c832b5ae2cbf630f98ae0a7e354953fc05180d82..537f06d311d5679e24ca879c03ad7bf1a23e2dae 100644 (file)
@@ -282,7 +282,12 @@ SM_STATE(SUPP_PAE, CONNECTING)
                 * delay authentication. Use a short timeout to send the first
                 * EAPOL-Start if Authenticator does not start authentication.
                 */
+#ifdef CONFIG_WPS
+               /* Reduce latency on starting WPS negotiation. */
+               sm->startWhen = 1;
+#else /* CONFIG_WPS */
                sm->startWhen = 3;
+#endif /* CONFIG_WPS */
        }
        eapol_enable_timer_tick(sm);
        sm->eapolEap = FALSE;