diff --git a/components/driver/test/test_adc2.c b/components/driver/test/test_adc2.c index df9e0aeaae..120a998911 100644 --- a/components/driver/test/test_adc2.c +++ b/components/driver/test/test_adc2.c @@ -82,7 +82,7 @@ TEST_CASE("adc2 work with wifi","[adc]") }, }; TEST_ESP_OK(esp_wifi_set_mode(WIFI_MODE_STA)); - TEST_ESP_OK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config)); + TEST_ESP_OK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config)); //test read value TEST_ESP_OK( adc2_get_raw( ADC2_CHANNEL_8, ADC_WIDTH_12Bit, &read_raw )); @@ -205,7 +205,7 @@ TEST_CASE("adc1 and i2s work with wifi","[adc]") }, }; TEST_ESP_OK(esp_wifi_set_mode(WIFI_MODE_STA)); - TEST_ESP_OK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config)); + TEST_ESP_OK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config)); i2s_adc_test(); //now start wifi printf("wifi start...\n"); diff --git a/components/esp_wifi/test/test_wifi.c b/components/esp_wifi/test/test_wifi.c index 24144f7fd9..fba815d6d7 100644 --- a/components/esp_wifi/test/test_wifi.c +++ b/components/esp_wifi/test/test_wifi.c @@ -74,7 +74,7 @@ static void test_wifi_init_deinit(wifi_init_config_t *cfg, wifi_config_t* wifi_c ESP_LOGI(TAG, EMPH_STR("esp_wifi_set_mode")); TEST_ESP_OK(esp_wifi_set_mode(WIFI_MODE_STA)); ESP_LOGI(TAG, EMPH_STR("esp_wifi_set_config")); - TEST_ESP_OK(esp_wifi_set_config(ESP_IF_WIFI_STA, wifi_config)); + TEST_ESP_OK(esp_wifi_set_config(WIFI_IF_STA, wifi_config)); ESP_LOGI(TAG, EMPH_STR("esp_wifi_deinit...")); TEST_ESP_OK(esp_wifi_deinit()); } @@ -88,7 +88,7 @@ static void test_wifi_start_stop(wifi_init_config_t *cfg, wifi_config_t* wifi_co ESP_LOGI(TAG, EMPH_STR("esp_wifi_set_mode")); TEST_ESP_OK(esp_wifi_set_mode(WIFI_MODE_STA)); ESP_LOGI(TAG, EMPH_STR("esp_wifi_set_config")); - TEST_ESP_OK(esp_wifi_set_config(ESP_IF_WIFI_STA, wifi_config)); + TEST_ESP_OK(esp_wifi_set_config(WIFI_IF_STA, wifi_config)); //now start wifi ESP_LOGI(TAG, EMPH_STR("esp_wifi_start...")); TEST_ESP_OK(esp_wifi_start()); diff --git a/components/tcpip_adapter/event_handlers.c b/components/tcpip_adapter/event_handlers.c index 95d5043872..27c4251652 100644 --- a/components/tcpip_adapter/event_handlers.c +++ b/components/tcpip_adapter/event_handlers.c @@ -143,7 +143,7 @@ static void handle_sta_start(void *arg, esp_event_base_t base, int32_t event_id, uint8_t sta_mac[6]; API_CALL_CHECK("esp_wifi_internal_reg_netstack_buf_cb",esp_wifi_internal_reg_netstack_buf_cb(esp_netif_netstack_buf_ref, esp_netif_netstack_buf_free), ESP_OK); - API_CALL_CHECK("esp_wifi_mac_get", esp_wifi_get_mac(ESP_IF_WIFI_STA, sta_mac), ESP_OK); + API_CALL_CHECK("esp_wifi_mac_get", esp_wifi_get_mac(WIFI_IF_STA, sta_mac), ESP_OK); tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &sta_ip); tcpip_adapter_sta_start(sta_mac, &sta_ip); } @@ -157,7 +157,7 @@ static void handle_sta_connected(void *arg, esp_event_base_t base, int32_t event { tcpip_adapter_dhcp_status_t status; - API_CALL_CHECK("esp_wifi_internal_reg_rxcb", esp_wifi_internal_reg_rxcb(ESP_IF_WIFI_STA, (wifi_rxcb_t)tcpip_adapter_sta_input), ESP_OK); + API_CALL_CHECK("esp_wifi_internal_reg_rxcb", esp_wifi_internal_reg_rxcb(WIFI_IF_STA, (wifi_rxcb_t)tcpip_adapter_sta_input), ESP_OK); tcpip_adapter_up(TCPIP_ADAPTER_IF_STA); @@ -196,7 +196,7 @@ static void handle_sta_connected(void *arg, esp_event_base_t base, int32_t event static void handle_sta_disconnected(void *arg, esp_event_base_t base, int32_t event_id, void *data) { tcpip_adapter_down(TCPIP_ADAPTER_IF_STA); - API_CALL_CHECK("esp_wifi_internal_reg_rxcb", esp_wifi_internal_reg_rxcb(ESP_IF_WIFI_STA, NULL), ESP_OK); + API_CALL_CHECK("esp_wifi_internal_reg_rxcb", esp_wifi_internal_reg_rxcb(WIFI_IF_STA, NULL), ESP_OK); } diff --git a/components/wifi_provisioning/src/manager.c b/components/wifi_provisioning/src/manager.c index c36b3a8a00..fde7019ecd 100644 --- a/components/wifi_provisioning/src/manager.c +++ b/components/wifi_provisioning/src/manager.c @@ -1104,7 +1104,7 @@ esp_err_t wifi_prov_mgr_is_provisioned(bool *provisioned) /* Get Wi-Fi Station configuration */ wifi_config_t wifi_cfg; - if (esp_wifi_get_config(ESP_IF_WIFI_STA, &wifi_cfg) != ESP_OK) { + if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) != ESP_OK) { return ESP_FAIL; } @@ -1163,7 +1163,7 @@ esp_err_t wifi_prov_mgr_configure_sta(wifi_config_t *wifi_cfg) } /* Configure Wi-Fi station with host credentials * provided during provisioning */ - if (esp_wifi_set_config(ESP_IF_WIFI_STA, wifi_cfg) != ESP_OK) { + if (esp_wifi_set_config(WIFI_IF_STA, wifi_cfg) != ESP_OK) { ESP_LOGE(TAG, "Failed to set Wi-Fi configuration"); RELEASE_LOCK(prov_ctx_lock); return ESP_FAIL; @@ -1433,14 +1433,14 @@ esp_err_t wifi_prov_mgr_start_provisioning(wifi_prov_security_t security, const * to the AP whose credentials were present earlier */ wifi_config_t wifi_cfg_empty, wifi_cfg_old; memset(&wifi_cfg_empty, 0, sizeof(wifi_config_t)); - esp_wifi_get_config(ESP_IF_WIFI_STA, &wifi_cfg_old); + esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg_old); err = esp_wifi_set_storage(WIFI_STORAGE_RAM); if (err != ESP_OK) { ESP_LOGE(TAG, "Failed to set Wi-Fi storage to RAM"); RELEASE_LOCK(prov_ctx_lock); return err; } - esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_cfg_empty); + esp_wifi_set_config(WIFI_IF_STA, &wifi_cfg_empty); if (err != ESP_OK) { ESP_LOGE(TAG, "Failed to set empty Wi-Fi credentials"); RELEASE_LOCK(prov_ctx_lock); @@ -1526,7 +1526,7 @@ esp_err_t wifi_prov_mgr_start_provisioning(wifi_prov_security_t security, const err: prov_ctx->prov_state = WIFI_PROV_STATE_IDLE; esp_wifi_set_storage(WIFI_STORAGE_FLASH); - esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_cfg_old); + esp_wifi_set_config(WIFI_IF_STA, &wifi_cfg_old); exit: RELEASE_LOCK(prov_ctx_lock); diff --git a/components/wpa_supplicant/src/rsn_supp/wpa.c b/components/wpa_supplicant/src/rsn_supp/wpa.c index 898fdf54db..074393b016 100644 --- a/components/wpa_supplicant/src/rsn_supp/wpa.c +++ b/components/wpa_supplicant/src/rsn_supp/wpa.c @@ -1021,7 +1021,7 @@ int ieee80211w_set_keys(struct wpa_sm *sm, if (keyidx > 4095) { return -1; } - return esp_wifi_set_igtk_internal(ESP_IF_WIFI_STA, igtk); + return esp_wifi_set_igtk_internal(WIFI_IF_STA, igtk); } return 0; #else @@ -2151,7 +2151,7 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher, if (esp_wifi_sta_pmf_enabled()) { wifi_config_t wifi_cfg; - esp_wifi_get_config(ESP_IF_WIFI_STA, &wifi_cfg); + esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg); sm->pmf_cfg = wifi_cfg.sta.pmf_cfg; sm->mgmt_group_cipher = cipher_type_map_public_to_supp(esp_wifi_sta_get_mgmt_group_cipher()); } else { diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c index bc9de24b8d..1d53830b62 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c @@ -160,7 +160,7 @@ static bool wifi_cmd_sta_join(const char *ssid, const char *pass) reconnect = true; esp_wifi_disconnect(); //ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); //by snake - ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) ); + ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); esp_wifi_connect(); xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT, 0, 1, 5000 / portTICK_RATE_MS); diff --git a/examples/common_components/protocol_examples_common/connect.c b/examples/common_components/protocol_examples_common/connect.c index 1aaf3da4a4..a4cfb96801 100644 --- a/examples/common_components/protocol_examples_common/connect.c +++ b/examples/common_components/protocol_examples_common/connect.c @@ -136,7 +136,7 @@ static void start() }; ESP_LOGI(TAG, "Connecting to %s...", wifi_config.sta.ssid); ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config)); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config)); ESP_ERROR_CHECK(esp_wifi_start()); esp_wifi_connect(); s_connection_name = CONFIG_EXAMPLE_WIFI_SSID; diff --git a/examples/protocols/esp_local_ctrl/main/app_main.c b/examples/protocols/esp_local_ctrl/main/app_main.c index a9e541f87d..cb32c14476 100644 --- a/examples/protocols/esp_local_ctrl/main/app_main.c +++ b/examples/protocols/esp_local_ctrl/main/app_main.c @@ -87,7 +87,7 @@ esp_err_t wifi_init_sta(void) }, }; ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) ); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) ); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); ESP_ERROR_CHECK(esp_wifi_start() ); ESP_LOGI(TAG, "wifi_init_sta finished."); diff --git a/examples/provisioning/ble_prov/main/app_prov.c b/examples/provisioning/ble_prov/main/app_prov.c index 7ce62346fa..55a4ea857c 100644 --- a/examples/provisioning/ble_prov/main/app_prov.c +++ b/examples/provisioning/ble_prov/main/app_prov.c @@ -287,7 +287,7 @@ esp_err_t app_prov_is_provisioned(bool *provisioned) /* Get WiFi Station configuration */ wifi_config_t wifi_cfg; - if (esp_wifi_get_config(ESP_IF_WIFI_STA, &wifi_cfg) != ESP_OK) { + if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) != ESP_OK) { return ESP_FAIL; } @@ -308,7 +308,7 @@ esp_err_t app_prov_configure_sta(wifi_config_t *wifi_cfg) } /* Configure WiFi station with host credentials * provided during provisioning */ - if (esp_wifi_set_config(ESP_IF_WIFI_STA, wifi_cfg) != ESP_OK) { + if (esp_wifi_set_config(WIFI_IF_STA, wifi_cfg) != ESP_OK) { ESP_LOGE(TAG, "Failed to set WiFi configuration"); return ESP_FAIL; } diff --git a/examples/provisioning/console_prov/main/app_prov.c b/examples/provisioning/console_prov/main/app_prov.c index c02e482803..55a9c15b48 100644 --- a/examples/provisioning/console_prov/main/app_prov.c +++ b/examples/provisioning/console_prov/main/app_prov.c @@ -225,7 +225,7 @@ esp_err_t app_prov_is_provisioned(bool *provisioned) /* Get WiFi Station configuration */ wifi_config_t wifi_cfg; - if (esp_wifi_get_config(ESP_IF_WIFI_STA, &wifi_cfg) != ESP_OK) { + if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) != ESP_OK) { return ESP_FAIL; } @@ -246,7 +246,7 @@ esp_err_t app_prov_configure_sta(wifi_config_t *wifi_cfg) } /* Configure WiFi station with host credentials * provided during provisioning */ - if (esp_wifi_set_config(ESP_IF_WIFI_STA, wifi_cfg) != ESP_OK) { + if (esp_wifi_set_config(WIFI_IF_STA, wifi_cfg) != ESP_OK) { ESP_LOGE(TAG, "Failed to set WiFi configuration"); return ESP_FAIL; } diff --git a/examples/provisioning/custom_config/main/app_prov.c b/examples/provisioning/custom_config/main/app_prov.c index 16e893a999..4bb2ecc5e8 100644 --- a/examples/provisioning/custom_config/main/app_prov.c +++ b/examples/provisioning/custom_config/main/app_prov.c @@ -250,7 +250,7 @@ esp_err_t app_prov_is_provisioned(bool *provisioned) /* Get WiFi Station configuration */ wifi_config_t wifi_cfg; - if (esp_wifi_get_config(ESP_IF_WIFI_STA, &wifi_cfg) != ESP_OK) { + if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) != ESP_OK) { return ESP_FAIL; } @@ -271,7 +271,7 @@ esp_err_t app_prov_configure_sta(wifi_config_t *wifi_cfg) } /* Configure WiFi station with host credentials * provided during provisioning */ - if (esp_wifi_set_config(ESP_IF_WIFI_STA, wifi_cfg) != ESP_OK) { + if (esp_wifi_set_config(WIFI_IF_STA, wifi_cfg) != ESP_OK) { ESP_LOGE(TAG, "Failed to set WiFi configuration"); return ESP_FAIL; } diff --git a/examples/provisioning/softap_prov/main/app_prov.c b/examples/provisioning/softap_prov/main/app_prov.c index 11e7988540..240c02c5a8 100644 --- a/examples/provisioning/softap_prov/main/app_prov.c +++ b/examples/provisioning/softap_prov/main/app_prov.c @@ -236,7 +236,7 @@ esp_err_t app_prov_is_provisioned(bool *provisioned) /* Get WiFi Station configuration */ wifi_config_t wifi_cfg; - if (esp_wifi_get_config(ESP_IF_WIFI_STA, &wifi_cfg) != ESP_OK) { + if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) != ESP_OK) { return ESP_FAIL; } @@ -257,7 +257,7 @@ esp_err_t app_prov_configure_sta(wifi_config_t *wifi_cfg) } /* Configure WiFi station with host credentials * provided during provisioning */ - if (esp_wifi_set_config(ESP_IF_WIFI_STA, wifi_cfg) != ESP_OK) { + if (esp_wifi_set_config(WIFI_IF_STA, wifi_cfg) != ESP_OK) { ESP_LOGE(TAG, "Failed to set WiFi configuration"); return ESP_FAIL; } diff --git a/examples/system/console/main/cmd_wifi.c b/examples/system/console/main/cmd_wifi.c index 531fbfe857..040fc305fa 100644 --- a/examples/system/console/main/cmd_wifi.c +++ b/examples/system/console/main/cmd_wifi.c @@ -67,7 +67,7 @@ static bool wifi_join(const char *ssid, const char *pass, int timeout_ms) } ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); - ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) ); + ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); esp_wifi_connect(); int bits = xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT, diff --git a/examples/wifi/fast_scan/main/fast_scan.c b/examples/wifi/fast_scan/main/fast_scan.c index 4f1ffd4888..18098c3151 100644 --- a/examples/wifi/fast_scan/main/fast_scan.c +++ b/examples/wifi/fast_scan/main/fast_scan.c @@ -105,7 +105,7 @@ static void fast_scan(void) }, }; ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config)); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config)); ESP_ERROR_CHECK(esp_wifi_start()); } diff --git a/examples/wifi/getting_started/station/main/station_example_main.c b/examples/wifi/getting_started/station/main/station_example_main.c index 03e6b19c3a..1aa246bb06 100644 --- a/examples/wifi/getting_started/station/main/station_example_main.c +++ b/examples/wifi/getting_started/station/main/station_example_main.c @@ -94,7 +94,7 @@ void wifi_init_sta() }, }; ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) ); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) ); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); ESP_ERROR_CHECK(esp_wifi_start() ); ESP_LOGI(TAG, "wifi_init_sta finished."); diff --git a/examples/wifi/iperf/main/cmd_wifi.c b/examples/wifi/iperf/main/cmd_wifi.c index a6be001c9b..257d499a7f 100644 --- a/examples/wifi/iperf/main/cmd_wifi.c +++ b/examples/wifi/iperf/main/cmd_wifi.c @@ -140,7 +140,7 @@ static bool wifi_cmd_sta_join(const char* ssid, const char* pass) reconnect = true; ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); - ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) ); + ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); esp_wifi_connect(); xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT, 0, 1, 5000/portTICK_RATE_MS); diff --git a/examples/wifi/power_save/main/power_save.c b/examples/wifi/power_save/main/power_save.c index efa7f41c54..c65ade601c 100644 --- a/examples/wifi/power_save/main/power_save.c +++ b/examples/wifi/power_save/main/power_save.c @@ -72,7 +72,7 @@ static void wifi_power_save(void) }, }; ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config)); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config)); ESP_ERROR_CHECK(esp_wifi_start()); ESP_LOGI(TAG, "esp_wifi_set_ps()."); diff --git a/examples/wifi/smart_config/main/smartconfig_main.c b/examples/wifi/smart_config/main/smartconfig_main.c index 2755ef19ea..f6e5505288 100644 --- a/examples/wifi/smart_config/main/smartconfig_main.c +++ b/examples/wifi/smart_config/main/smartconfig_main.c @@ -69,7 +69,7 @@ static void event_handler(void* arg, esp_event_base_t event_base, ESP_LOGI(TAG, "PASSWORD:%s", password); ESP_ERROR_CHECK( esp_wifi_disconnect() ); - ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) ); + ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); esp_wifi_connect(); } else if (event_base == SC_EVENT && event_id == SC_EVENT_SEND_ACK_DONE) { xEventGroupSetBits(s_wifi_event_group, ESPTOUCH_DONE_BIT); diff --git a/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c b/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c index 232065c4b5..db383bfe02 100644 --- a/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c +++ b/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c @@ -110,7 +110,7 @@ static void initialise_wifi(void) }; ESP_LOGI(TAG, "Setting WiFi configuration SSID %s...", wifi_config.sta.ssid); ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); - ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) ); + ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); ESP_ERROR_CHECK( esp_wifi_sta_wpa2_ent_set_ca_cert(ca_pem_start, ca_pem_bytes) ); ESP_ERROR_CHECK( esp_wifi_sta_wpa2_ent_set_cert_key(client_crt_start, client_crt_bytes,\ client_key_start, client_key_bytes, NULL, 0) ); @@ -133,7 +133,7 @@ static void wpa2_enterprise_example_task(void *pvParameters) while (1) { vTaskDelay(2000 / portTICK_PERIOD_MS); - if (tcpip_adapter_get_ip_info(ESP_IF_WIFI_STA, &ip) == 0) { + if (tcpip_adapter_get_ip_info(WIFI_IF_STA, &ip) == 0) { ESP_LOGI(TAG, "~~~~~~~~~~~"); ESP_LOGI(TAG, "IP:"IPSTR, IP2STR(&ip.ip)); ESP_LOGI(TAG, "MASK:"IPSTR, IP2STR(&ip.netmask)); diff --git a/examples/wifi/wps/main/wps.c b/examples/wifi/wps/main/wps.c index 3250f7fc56..0ce7cdfd7f 100644 --- a/examples/wifi/wps/main/wps.c +++ b/examples/wifi/wps/main/wps.c @@ -72,7 +72,7 @@ static void wifi_event_handler(void* arg, esp_event_base_t event_base, if (ap_idx < s_ap_creds_num) { ESP_LOGI(TAG, "Connecting to SSID: %s, Passphrase: %s", wps_ap_creds[ap_idx].sta.ssid, wps_ap_creds[ap_idx].sta.password); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wps_ap_creds[ap_idx++]) ); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wps_ap_creds[ap_idx++]) ); esp_wifi_connect(); } s_retry_num = 0; @@ -99,7 +99,7 @@ static void wifi_event_handler(void* arg, esp_event_base_t event_base, /* If multiple AP credentials are received from WPS, connect with first one */ ESP_LOGI(TAG, "Connecting to SSID: %s, Passphrase: %s", wps_ap_creds[0].sta.ssid, wps_ap_creds[0].sta.password); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wps_ap_creds[0]) ); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wps_ap_creds[0]) ); } /* * If only one AP credential is received from WPS, there will be no event data and