mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
fix(wpa_supplicant): Move concurrent wps and dpp check to before creating task
- Move the check for checking concurrent wps and dpp check to before creating task rather than after.
This commit is contained in:
parent
290b30e56e
commit
8009cdae1d
@ -1852,6 +1852,11 @@ int esp_wifi_wps_enable(const esp_wps_config_t *config)
|
||||
return ESP_ERR_WIFI_MODE;
|
||||
}
|
||||
|
||||
if (is_dpp_enabled()) {
|
||||
wpa_printf(MSG_ERROR, "wps enabled failed since DPP is initialized");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
API_MUTEX_TAKE();
|
||||
if (s_wps_enabled) {
|
||||
if (sm && os_memcmp(sm->identity, WSC_ID_REGISTRAR, sm->identity_len) == 0) {
|
||||
@ -1904,10 +1909,6 @@ int wifi_wps_enable_internal(const esp_wps_config_t *config)
|
||||
wpa_printf(MSG_ERROR, "wps enable: invalid wps type");
|
||||
return ESP_ERR_WIFI_WPS_TYPE;
|
||||
}
|
||||
if (is_dpp_enabled()) {
|
||||
wpa_printf(MSG_ERROR, "wps enabled failed since DPP is initialized");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
wpa_printf(MSG_DEBUG, "Set factory information.");
|
||||
ret = wps_set_factory_info(config);
|
||||
if (ret != 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user