mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-23 18:18:36 +08:00
Merge branch 'revert-b29ffce3' into 'master'
Revert "Merge branch 'bugfix/fix_addr_changed_when_wifi_disconnect' into 'master'" See merge request sdk/ESP8266_RTOS_SDK!1388
This commit is contained in:
@ -449,7 +449,9 @@ esp_err_t tcpip_adapter_up(tcpip_adapter_if_t tcpip_if)
|
|||||||
return ESP_ERR_TCPIP_ADAPTER_IF_NOT_READY;
|
return ESP_ERR_TCPIP_ADAPTER_IF_NOT_READY;
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_netif[tcpip_if]->flags |= NETIF_FLAG_UP;
|
/* use last obtained ip, or static ip */
|
||||||
|
netif_set_addr(esp_netif[tcpip_if], &esp_ip[tcpip_if].ip, &esp_ip[tcpip_if].netmask, &esp_ip[tcpip_if].gw);
|
||||||
|
netif_set_up(esp_netif[tcpip_if]);
|
||||||
}
|
}
|
||||||
|
|
||||||
tcpip_adapter_update_default_netif();
|
tcpip_adapter_update_default_netif();
|
||||||
@ -480,7 +482,9 @@ esp_err_t tcpip_adapter_down(tcpip_adapter_if_t tcpip_if)
|
|||||||
tcpip_adapter_reset_ip_info(tcpip_if);
|
tcpip_adapter_reset_ip_info(tcpip_if);
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_netif[tcpip_if]->flags &= ~NETIF_FLAG_UP;
|
netif_set_addr(esp_netif[tcpip_if], IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
|
||||||
|
netif_set_down(esp_netif[tcpip_if]);
|
||||||
|
tcpip_adapter_start_ip_lost_timer(tcpip_if);
|
||||||
}
|
}
|
||||||
|
|
||||||
tcpip_adapter_update_default_netif();
|
tcpip_adapter_update_default_netif();
|
||||||
|
Reference in New Issue
Block a user