mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'bugfix/wps_finish_bug' into 'master'
fix(esp_wifi): Fix bug where wps_finish is called recursively Closes WIFIBUG-1520 and WIFIBUG-1675 See merge request espressif/esp-idf!45287
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user