aboutsummaryrefslogtreecommitdiffstats
path: root/src/eapol_supp/eapol_supp_sm.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-02-23 18:59:27 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-23 18:59:27 (GMT)
commitb414900a90829d3d3a58a45f29be708a6757b258 (patch)
tree09b62b59c00601ff74321c7c2f3d4d919b3b3cfd /src/eapol_supp/eapol_supp_sm.c
parenta9aca28ba336c4bc81a946f9f36a103915306b41 (diff)
downloadhostap-b414900a90829d3d3a58a45f29be708a6757b258.zip
hostap-b414900a90829d3d3a58a45f29be708a6757b258.tar.gz
hostap-b414900a90829d3d3a58a45f29be708a6757b258.tar.bz2
Reduce latency on starting WPS negotiation (TX EAPOL-Start earlier)
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.
Diffstat (limited to 'src/eapol_supp/eapol_supp_sm.c')
-rw-r--r--src/eapol_supp/eapol_supp_sm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index c832b5a..537f06d 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -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;