Fix couple of forgotten wpa_hw_modes -> hostapd_hw_modes
[wpasupplicant] / hostapd / eapol_sm.c
index 4f52475..8e9d56c 100644 (file)
@@ -140,9 +140,14 @@ static void eapol_auth_tx_req(struct eapol_state_machine *sm)
 }
 
 
-/* Port Timers state machine - implemented as a function that will be called
- * once a second as a registered event loop timeout */
-
+/**
+ * eapol_port_timers_tick - Port Timers state machine
+ * @eloop_ctx: struct eapol_state_machine *
+ * @timeout_ctx: Not used
+ *
+ * This statemachine is implemented as a function that will be called
+ * once a second as a registered event loop timeout.
+ */
 static void eapol_port_timers_tick(void *eloop_ctx, void *timeout_ctx)
 {
        struct eapol_state_machine *state = timeout_ctx;
@@ -174,6 +179,15 @@ static void eapol_port_timers_tick(void *eloop_ctx, void *timeout_ctx)
                }
        }
 
+       if (state->eap_if->retransWhile > 0) {
+               state->eap_if->retransWhile--;
+               if (state->eap_if->retransWhile == 0) {
+                       wpa_printf(MSG_DEBUG, "IEEE 802.1X: " MACSTR
+                                  " - (EAP) retransWhile --> 0",
+                                  MAC2STR(state->addr));
+               }
+       }
+
        eapol_sm_step_run(state);
 
        eloop_register_timeout(1, 0, eapol_port_timers_tick, eloop_ctx, state);
@@ -812,6 +826,8 @@ eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
        eap_conf.pac_key_refresh_time = eapol->conf.pac_key_refresh_time;
        eap_conf.eap_sim_aka_result_ind = eapol->conf.eap_sim_aka_result_ind;
        eap_conf.tnc = eapol->conf.tnc;
+       eap_conf.wps = eapol->conf.wps;
+       eap_conf.assoc_wps_ie = sta->wps_ie;
        sm->eap = eap_server_sm_init(sm, &eapol_cb, &eap_conf);
        if (sm->eap == NULL) {
                eapol_auth_free(sm);
@@ -930,6 +946,13 @@ static void eapol_sm_step_cb(void *eloop_ctx, void *timeout_ctx)
 }
 
 
+/**
+ * eapol_auth_step - Advance EAPOL state machines
+ * @sm: EAPOL state machine
+ *
+ * This function is called to advance EAPOL state machines after any change
+ * that could affect their state.
+ */
 void eapol_auth_step(struct eapol_state_machine *sm)
 {
        /*
@@ -1263,6 +1286,7 @@ static int eapol_auth_conf_clone(struct eapol_auth_config *dst,
        dst->pac_key_refresh_time = src->pac_key_refresh_time;
        dst->eap_sim_aka_result_ind = src->eap_sim_aka_result_ind;
        dst->tnc = src->tnc;
+       dst->wps = src->wps;
        return 0;
 }