mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Merge branch 'bugfix/wps_disable_disconnect_v4.3' into 'release/v4.3'
fix(wpa_supplicant): Fix WPS connection issue after WPS done (Backport v4.3) See merge request espressif/esp-idf!25249
This commit is contained in:
@ -2170,6 +2170,7 @@ int wifi_wps_disable_internal(void)
|
|||||||
int esp_wifi_wps_disable(void)
|
int esp_wifi_wps_disable(void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
int wps_status;
|
||||||
|
|
||||||
if (ESP_OK != wps_check_wifi_mode()) {
|
if (ESP_OK != wps_check_wifi_mode()) {
|
||||||
return ESP_ERR_WIFI_MODE;
|
return ESP_ERR_WIFI_MODE;
|
||||||
@ -2183,7 +2184,8 @@ int esp_wifi_wps_disable(void)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
wpa_printf(MSG_INFO, "wifi_wps_disable\n");
|
wps_status = wps_get_status();
|
||||||
|
wpa_printf(MSG_INFO, "wifi_wps_disable");
|
||||||
wps_set_type(WPS_TYPE_DISABLE); /* Notify WiFi task */
|
wps_set_type(WPS_TYPE_DISABLE); /* Notify WiFi task */
|
||||||
|
|
||||||
/* Call wps_delete_timer to delete all WPS timer, no timer will call wps_post()
|
/* Call wps_delete_timer to delete all WPS timer, no timer will call wps_post()
|
||||||
@ -2201,7 +2203,10 @@ int esp_wifi_wps_disable(void)
|
|||||||
wpa_printf(MSG_ERROR, "wps disable: failed to disable wps, ret=%d", ret);
|
wpa_printf(MSG_ERROR, "wps disable: failed to disable wps, ret=%d", ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_wifi_disconnect();
|
/* Only disconnect in case of WPS pending/done */
|
||||||
|
if ((wps_status == WPS_STATUS_PENDING) || (wps_status == WPS_STATUS_SUCCESS)) {
|
||||||
|
esp_wifi_disconnect();
|
||||||
|
}
|
||||||
esp_wifi_set_wps_start_flag_internal(false);
|
esp_wifi_set_wps_start_flag_internal(false);
|
||||||
wps_task_deinit();
|
wps_task_deinit();
|
||||||
s_wps_enabled = false;
|
s_wps_enabled = false;
|
||||||
|
Reference in New Issue
Block a user