mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
2dc272e88f
wifi_station_wps_start() calls esp_wifi_disconnect() to leave a previously connected AP before scanning for WPS registrars. When the STA is already connected, the async disconnect event triggers wps_sm_notify_deauth() which incorrectly treats it as a handshake failure, disabling WPS entirely. Guard wps_handle_failure() so it only fires when wps_get_status() is WPS_STATUS_PENDING, i.e. the STA has found a WPS AP and is actively in the M1-M8 exchange.