aboutsummaryrefslogtreecommitdiffstats
path: root/src/eapol_supp
diff options
context:
space:
mode:
authorJustin Shen <chias@qca.qualcomm.com>2014-10-13 07:40:08 (GMT)
committerJouni Malinen <j@w1.fi>2014-10-13 09:24:17 (GMT)
commit3f7ac05878ba965e941f2b5b80b8cb744e63f506 (patch)
tree08f89d88585fee98118fa1d42b59519d13ecbf17 /src/eapol_supp
parenta87e123a96bda0dd14dfe50b59f68c3e5bbb048f (diff)
downloadhostap-3f7ac05878ba965e941f2b5b80b8cb744e63f506.zip
hostap-3f7ac05878ba965e941f2b5b80b8cb744e63f506.tar.gz
hostap-3f7ac05878ba965e941f2b5b80b8cb744e63f506.tar.bz2
WPS: Extend startWhen to 2 if peer AP supports WPS 2.0
Increase EAPOL startWhen to 2 for the case where the AP/GO has advertised it supports WPS 2.0. This is done to make it less likely for the EAPOL-Start frame to be sent out since that is only required for WPS 1.0. Not sending it can remove one unnecessary round trip from the EAP exchange when the AP is going to start with EAP-Request/Identity immediately based on the Association Request frame. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/eapol_supp')
-rw-r--r--src/eapol_supp/eapol_supp_sm.c2
-rw-r--r--src/eapol_supp/eapol_supp_sm.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index ef8d6ee..5cc0508 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -255,7 +255,7 @@ SM_STATE(SUPP_PAE, CONNECTING)
* delay authentication. Use a short timeout to send the first
* EAPOL-Start if Authenticator does not start authentication.
*/
- if (sm->conf.wps) {
+ if (sm->conf.wps && !(sm->conf.wps & EAPOL_PEER_IS_WPS20_AP)) {
/* Reduce latency on starting WPS negotiation. */
wpa_printf(MSG_DEBUG,
"EAPOL: Using shorter startWhen for WPS");
diff --git a/src/eapol_supp/eapol_supp_sm.h b/src/eapol_supp/eapol_supp_sm.h
index 2a79052..cc3ca67 100644
--- a/src/eapol_supp/eapol_supp_sm.h
+++ b/src/eapol_supp/eapol_supp_sm.h
@@ -59,6 +59,8 @@ struct eapol_config {
*/
int external_sim;
+#define EAPOL_LOCAL_WPS_IN_USE BIT(0)
+#define EAPOL_PEER_IS_WPS20_AP BIT(1)
/**
* wps - Whether this connection is used for WPS
*/