Merge branch 'bugfix/wps_finish_bug_v6.0' into 'release/v6.0'

fix(esp_wifi): Fix bug where wps_finish is called recursively (v6.0)

See merge request espressif/esp-idf!45660
This commit is contained in:
Jiang Jiang Jian
2026-02-13 14:56:34 +08:00
2 changed files with 5 additions and 0 deletions
@@ -681,6 +681,10 @@ static int wps_finish(void)
}
if (sm->wps->state == WPS_FINISHED) {
if (sm->state == WPA_FINISH_PROCESS) {
return ESP_OK;
}
sm->state = WPA_FINISH_PROCESS;
bool connect = (sm->ap_cred_cnt == 1);
#ifdef CONFIG_WPS_RECONNECT_ON_FAIL
@@ -31,6 +31,7 @@ typedef struct {
enum wps_sm_state {
WAIT_START,
WPA_MESG,
WPA_FINISH_PROCESS,
WPA_FAIL
};
#endif /* ESP_SUPPLICANT */