wifi_provisioning: decouple wifi_prov_mgr_is_provisioned from manager state

`wifi_prov_mgr_is_provisioned()` API uses the `esp_wifi_get_config()` API
to check if Wi-Fi credentials are configured. It does not really require
any other information from the wifi_prov component. Hence, this commit
removed dependency of this API on provisioning manager initialization state.

Closes IDF-5878
This commit is contained in:
Mahavir Jain
2022-09-01 15:24:19 +05:30
parent 58c5c15f7e
commit 025a8378ef
2 changed files with 0 additions and 6 deletions

View File

@@ -1112,11 +1112,6 @@ esp_err_t wifi_prov_mgr_is_provisioned(bool *provisioned)
*provisioned = false;
if (!prov_ctx_lock) {
ESP_LOGE(TAG, "Provisioning manager not initialized");
return ESP_ERR_INVALID_STATE;
}
/* Get Wi-Fi Station configuration */
wifi_config_t wifi_cfg;
if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) != ESP_OK) {