esp_wifi: Modify WIFI_IF_AP to TCPIP_ADAPTER_IF_AP

This commit is contained in:
xiehang
2021-01-27 14:50:36 +08:00
parent 1975d39d44
commit 2091f4db1c
3 changed files with 4 additions and 4 deletions

View File

@ -88,7 +88,7 @@ static esp_err_t eth_event_handler(void *ctx, system_event_t *event)
break;
case SYSTEM_EVENT_ETH_GOT_IP:
memset(&ip, 0, sizeof(tcpip_adapter_ip_info_t));
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(ESP_IF_ETH, &ip));
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_ETH, &ip));
ESP_LOGI(TAG, "Ethernet Got IP Addr");
ESP_LOGI(TAG, "~~~~~~~~~~~");
ESP_LOGI(TAG, "ETHIP:" IPSTR, IP2STR(&ip.ip));

View File

@ -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(WIFI_IF_AP, &if_ip);
tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_AP, &if_ip);
if (!ip4_addr_isany_val(if_ip.gw)) {
*optptr++ = DHCP_OPTION_ROUTER;

View File

@ -683,7 +683,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(WIFI_IF_AP, &info);
tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_AP, &info);
softap_ip = htonl(info.ip.addr);
start_ip = htonl(poll->start_ip.addr);
end_ip = htonl(poll->end_ip.addr);
@ -854,7 +854,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(WIFI_IF_AP, &default_ip);
tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_AP, &default_ip);
dhcps_set_new_lease_cb(tcpip_adapter_dhcps_cb);
dhcps_start(p_netif, default_ip.ip);
dhcps_status = TCPIP_ADAPTER_DHCP_STARTED;