aboutsummaryrefslogtreecommitdiffstats
path: root/src/eapol_supp/eapol_supp_sm.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-11-28 18:32:13 (GMT)
committerJouni Malinen <j@w1.fi>2008-11-28 18:32:13 (GMT)
commit116654ce24fea104bd0eeb66499948df4d4df3ce (patch)
tree1662391971bc8a900bdfb216a4e10baece082f73 /src/eapol_supp/eapol_supp_sm.c
parentbcbbc7af45cc4b84a5c10e65f4283fdf68cd785a (diff)
downloadhostap-116654ce24fea104bd0eeb66499948df4d4df3ce.zip
hostap-116654ce24fea104bd0eeb66499948df4d4df3ce.tar.gz
hostap-116654ce24fea104bd0eeb66499948df4d4df3ce.tar.bz2
WPS: Moved wps_context initialization into wps_supplicant.c
The wps_context data is now managed at wpa_supplicant, not EAP-WSC. This makes wpa_supplicant design for WPS match with hostapd one and also makes it easier configure whatever parameters and callbacks are needed for WPS.
Diffstat (limited to 'src/eapol_supp/eapol_supp_sm.c')
-rw-r--r--src/eapol_supp/eapol_supp_sm.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index 5c06987..4d62071 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -1742,20 +1742,6 @@ static void eapol_sm_notify_pending(void *ctx)
}
-#ifdef CONFIG_WPS
-static int eapol_sm_wps_cred(void *ctx, const struct wps_credential *cred)
-{
- struct eapol_sm *sm = ctx;
- wpa_printf(MSG_DEBUG, "EAPOL: received new WPS credential");
- if (sm->ctx->wps_cred)
- return sm->ctx->wps_cred(sm->ctx->ctx, cred);
- return 0;
-}
-#else /* CONFIG_WPS */
-#define eapol_sm_wps_cred NULL
-#endif /* CONFIG_WPS */
-
-
#if defined(CONFIG_CTRL_IFACE) || !defined(CONFIG_NO_STDOUT_DEBUG)
static void eapol_sm_eap_param_needed(void *ctx, const char *field,
const char *txt)
@@ -1781,7 +1767,6 @@ static struct eapol_callbacks eapol_cb =
eapol_sm_set_config_blob,
eapol_sm_get_config_blob,
eapol_sm_notify_pending,
- eapol_sm_wps_cred,
eapol_sm_eap_param_needed
};
@@ -1821,6 +1806,7 @@ struct eapol_sm *eapol_sm_init(struct eapol_ctx *ctx)
#endif /* EAP_TLS_OPENSSL */
conf.mac_addr = ctx->mac_addr;
conf.uuid = ctx->uuid;
+ conf.wps = ctx->wps;
sm->eap = eap_peer_sm_init(sm, &eapol_cb, sm->ctx->msg_ctx, &conf);
if (sm->eap == NULL) {