fix(wifi): Disable wps in eloop context during wps timeout

This commit is contained in:
Sajia
2026-02-06 15:12:06 +05:30
parent 8065c61877
commit 87dba67ba4
2 changed files with 20 additions and 0 deletions
@@ -327,6 +327,13 @@ SM_STATE(AUTH_PAE, AUTHENTICATING)
sm->keyDone = false;
}
#ifdef ESP_SUPPLICANT
static void wifi_ap_wps_disable_timeout_handler(void *eloop_ctx, void *user_ctx)
{
extern int wifi_ap_wps_disable_internal(void);
wifi_ap_wps_disable_internal();
}
#endif
SM_STATE(AUTH_PAE, ABORTING)
{
@@ -344,6 +351,10 @@ SM_STATE(AUTH_PAE, ABORTING)
sm->authAbort = true;
sm->keyRun = false;
sm->keyDone = false;
#ifdef ESP_SUPPLICANT
sm->exit_sm_step_run = true;
eloop_register_timeout(0, 0, wifi_ap_wps_disable_timeout_handler, NULL, NULL);
#endif
}
@@ -921,6 +932,12 @@ restart:
if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
SM_STEP_RUN(CTRL_DIR);
#ifdef ESP_SUPPLICANT
if (sm->exit_sm_step_run) {
return;
}
#endif
if (prev_auth_pae != sm->auth_pae_state ||
prev_be_auth != sm->be_auth_state ||
prev_reauth_timer != sm->reauth_timer_state ||
@@ -171,6 +171,9 @@ struct eapol_state_machine {
int remediation;
u64 acct_multi_session_id;
#ifdef ESP_SUPPLICANT
bool exit_sm_step_run;
#endif
};
#endif /* EAPOL_AUTH_SM_I_H */