diff --git a/components/esp_wifi/test/test_wifi.c b/components/esp_wifi/test/test_wifi.c index fba815d6d7..bb46de5287 100644 --- a/components/esp_wifi/test/test_wifi.c +++ b/components/esp_wifi/test/test_wifi.c @@ -238,7 +238,7 @@ static void send_ds2ds_packet(void) // send packet 20 times to make sure receiver will get this packet for (uint16_t i = 0; i < 20; i++) { - esp_wifi_80211_tx(ESP_IF_WIFI_AP, ds2ds_pdu, sizeof(ds2ds_pdu), true); + esp_wifi_80211_tx(WIFI_IF_AP, ds2ds_pdu, sizeof(ds2ds_pdu), true); vTaskDelay(50 / portTICK_PERIOD_MS); } stop_wifi(); @@ -300,7 +300,7 @@ static void test_wifi_connection_softap(void) start_wifi_as_softap(); - TEST_ESP_OK(esp_wifi_get_mac(ESP_IF_WIFI_AP, mac)); + TEST_ESP_OK(esp_wifi_get_mac(WIFI_IF_AP, mac)); sprintf(mac_str, MACSTR, MAC2STR(mac)); unity_send_signal_param("SoftAP mac", mac_str); diff --git a/components/lwip/apps/dhcpserver/dhcpserver.c b/components/lwip/apps/dhcpserver/dhcpserver.c index df6a2af022..b85a256871 100644 --- a/components/lwip/apps/dhcpserver/dhcpserver.c +++ b/components/lwip/apps/dhcpserver/dhcpserver.c @@ -329,7 +329,7 @@ static u8_t *add_offer_options(u8_t *optptr) //bzero(&if_ip, sizeof(struct ip_info)); memset(&if_ip , 0x00, sizeof(tcpip_adapter_ip_info_t)); - tcpip_adapter_get_ip_info(ESP_IF_WIFI_AP, &if_ip); + tcpip_adapter_get_ip_info(WIFI_IF_AP, &if_ip); if (!ip4_addr_isany_val(if_ip.gw)) { *optptr++ = DHCP_OPTION_ROUTER; diff --git a/components/lwip/port/esp32/netif/dhcp_state.c b/components/lwip/port/esp32/netif/dhcp_state.c index 8e2e3d9f38..ebfe98a302 100644 --- a/components/lwip/port/esp32/netif/dhcp_state.c +++ b/components/lwip/port/esp32/netif/dhcp_state.c @@ -84,4 +84,4 @@ void dhcp_ip_addr_erase(void *netif) nvs_close(nvs); } } -} \ No newline at end of file +} diff --git a/components/tcpip_adapter/event_handlers.c b/components/tcpip_adapter/event_handlers.c index 27c4251652..8b6f8b9eb8 100644 --- a/components/tcpip_adapter/event_handlers.c +++ b/components/tcpip_adapter/event_handlers.c @@ -122,9 +122,9 @@ static void handle_ap_start(void *arg, esp_event_base_t base, int32_t event_id, tcpip_adapter_ip_info_t ap_ip; uint8_t ap_mac[6]; - API_CALL_CHECK("esp_wifi_internal_reg_rxcb", esp_wifi_internal_reg_rxcb(ESP_IF_WIFI_AP, (wifi_rxcb_t)tcpip_adapter_ap_input), ESP_OK); + API_CALL_CHECK("esp_wifi_internal_reg_rxcb", esp_wifi_internal_reg_rxcb(WIFI_IF_AP, (wifi_rxcb_t)tcpip_adapter_ap_input), ESP_OK); 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_AP, ap_mac), ESP_OK); + API_CALL_CHECK("esp_wifi_mac_get", esp_wifi_get_mac(WIFI_IF_AP, ap_mac), ESP_OK); tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_AP, &ap_ip); tcpip_adapter_ap_start(ap_mac, &ap_ip); @@ -132,7 +132,7 @@ static void handle_ap_start(void *arg, esp_event_base_t base, int32_t event_id, static void handle_ap_stop(void *arg, esp_event_base_t base, int32_t event_id, void *data) { - API_CALL_CHECK("esp_wifi_internal_reg_rxcb", esp_wifi_internal_reg_rxcb(ESP_IF_WIFI_AP, NULL), ESP_OK); + API_CALL_CHECK("esp_wifi_internal_reg_rxcb", esp_wifi_internal_reg_rxcb(WIFI_IF_AP, NULL), ESP_OK); tcpip_adapter_stop(TCPIP_ADAPTER_IF_AP); } diff --git a/components/tcpip_adapter/tcpip_adapter_lwip.c b/components/tcpip_adapter/tcpip_adapter_lwip.c index fae54d0533..9bd19fab31 100644 --- a/components/tcpip_adapter/tcpip_adapter_lwip.c +++ b/components/tcpip_adapter/tcpip_adapter_lwip.c @@ -702,7 +702,7 @@ esp_err_t tcpip_adapter_dhcps_option(tcpip_adapter_dhcp_option_mode_t opt_op, tc if (poll->enable) { memset(&info, 0x00, sizeof(tcpip_adapter_ip_info_t)); - tcpip_adapter_get_ip_info(ESP_IF_WIFI_AP, &info); + tcpip_adapter_get_ip_info(WIFI_IF_AP, &info); softap_ip = htonl(info.ip.addr); start_ip = htonl(poll->start_ip.addr); end_ip = htonl(poll->end_ip.addr); @@ -874,7 +874,7 @@ esp_err_t tcpip_adapter_dhcps_start(tcpip_adapter_if_t tcpip_if) if (p_netif != NULL && netif_is_up(p_netif)) { tcpip_adapter_ip_info_t default_ip; - tcpip_adapter_get_ip_info(ESP_IF_WIFI_AP, &default_ip); + tcpip_adapter_get_ip_info(WIFI_IF_AP, &default_ip); dhcps_start(p_netif, default_ip.ip); dhcps_status = TCPIP_ADAPTER_DHCP_STARTED; ESP_LOGD(TAG, "dhcp server start successfully"); diff --git a/components/wifi_provisioning/src/scheme_softap.c b/components/wifi_provisioning/src/scheme_softap.c index 2b0c3c242b..ebb42760a3 100644 --- a/components/wifi_provisioning/src/scheme_softap.c +++ b/components/wifi_provisioning/src/scheme_softap.c @@ -60,7 +60,7 @@ static esp_err_t start_wifi_ap(const char *ssid, const char *pass) ESP_LOGE(TAG, "Failed to set Wi-Fi mode : %d", err); return err; } - err = esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config); + err = esp_wifi_set_config(WIFI_IF_AP, &wifi_config); if (err != ESP_OK) { ESP_LOGE(TAG, "Failed to set Wi-Fi config : %d", err); return err; 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 1d53830b62..6539ad1916 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 @@ -240,7 +240,7 @@ static bool wifi_cmd_ap_set(const char *ssid, const char *pass) } ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP)); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config)); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &wifi_config)); return true; } diff --git a/examples/ethernet/eth2ap/main/ethernet_example_main.c b/examples/ethernet/eth2ap/main/ethernet_example_main.c index 4baace1acf..435a435d78 100644 --- a/examples/ethernet/eth2ap/main/ethernet_example_main.c +++ b/examples/ethernet/eth2ap/main/ethernet_example_main.c @@ -81,7 +81,7 @@ static void eth2wifi_flow_control_task(void *args) do { vTaskDelay(pdMS_TO_TICKS(timeout)); timeout += 2; - res = esp_wifi_internal_tx(ESP_IF_WIFI_AP, msg.packet, msg.length); + res = esp_wifi_internal_tx(WIFI_IF_AP, msg.packet, msg.length); } while (res && timeout < FLOW_CONTROL_WIFI_SEND_TIMEOUT_MS); if (res != ESP_OK) { ESP_LOGE(TAG, "WiFi send packet failed: %d", res); @@ -129,12 +129,12 @@ static void wifi_event_handler(void *arg, esp_event_base_t event_base, case WIFI_EVENT_AP_STACONNECTED: ESP_LOGI(TAG, "Wi-Fi AP got a station connected"); s_sta_is_connected = true; - esp_wifi_internal_reg_rxcb(ESP_IF_WIFI_AP, pkt_wifi2eth); + esp_wifi_internal_reg_rxcb(WIFI_IF_AP, pkt_wifi2eth); break; case WIFI_EVENT_AP_STADISCONNECTED: ESP_LOGI(TAG, "Wi-Fi AP got a station disconnected"); s_sta_is_connected = false; - esp_wifi_internal_reg_rxcb(ESP_IF_WIFI_AP, NULL); + esp_wifi_internal_reg_rxcb(WIFI_IF_AP, NULL); break; default: break; @@ -214,7 +214,7 @@ static void initialize_wifi(void) wifi_config.ap.authmode = WIFI_AUTH_OPEN; } ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP)); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config)); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &wifi_config)); } static esp_err_t initialize_flow_control(void) diff --git a/examples/provisioning/custom_config/main/app_prov.c b/examples/provisioning/custom_config/main/app_prov.c index 4bb2ecc5e8..88d11a75a9 100644 --- a/examples/provisioning/custom_config/main/app_prov.c +++ b/examples/provisioning/custom_config/main/app_prov.c @@ -318,7 +318,7 @@ static esp_err_t start_wifi_ap(const char *ssid, const char *pass) ESP_LOGE(TAG, "Failed to set WiFi mode : %d", err); return err; } - err = esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config); + err = esp_wifi_set_config(WIFI_IF_AP, &wifi_config); if (err != ESP_OK) { ESP_LOGE(TAG, "Failed to set WiFi config : %d", err); return err; diff --git a/examples/provisioning/softap_prov/main/app_prov.c b/examples/provisioning/softap_prov/main/app_prov.c index 240c02c5a8..63190e0a4e 100644 --- a/examples/provisioning/softap_prov/main/app_prov.c +++ b/examples/provisioning/softap_prov/main/app_prov.c @@ -304,7 +304,7 @@ static esp_err_t start_wifi_ap(const char *ssid, const char *pass) ESP_LOGE(TAG, "Failed to set WiFi mode : %d", err); return err; } - err = esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config); + err = esp_wifi_set_config(WIFI_IF_AP, &wifi_config); if (err != ESP_OK) { ESP_LOGE(TAG, "Failed to set WiFi config : %d", err); return err; diff --git a/examples/wifi/getting_started/softAP/main/softap_example_main.c b/examples/wifi/getting_started/softAP/main/softap_example_main.c index ca6d0933df..7884cbac45 100644 --- a/examples/wifi/getting_started/softAP/main/softap_example_main.c +++ b/examples/wifi/getting_started/softAP/main/softap_example_main.c @@ -69,7 +69,7 @@ void wifi_init_softap() } ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP)); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config)); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &wifi_config)); ESP_ERROR_CHECK(esp_wifi_start()); ESP_LOGI(TAG, "wifi_init_softap finished. SSID:%s password:%s channel:%d", diff --git a/examples/wifi/iperf/main/cmd_wifi.c b/examples/wifi/iperf/main/cmd_wifi.c index 257d499a7f..7005bd4517 100644 --- a/examples/wifi/iperf/main/cmd_wifi.c +++ b/examples/wifi/iperf/main/cmd_wifi.c @@ -220,7 +220,7 @@ static bool wifi_cmd_ap_set(const char* ssid, const char* pass) } ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP)); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config)); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &wifi_config)); return true; }