mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
esp32/tcpipadapter: correct eth ip got event info
1. Raise SYSTEM_EVENT_ETH_GOT_IP when eth got ip 2. Add default handler for SYSTEM_EVENT_ETH_GOT_IP 3. Minor change about ethernet kconfig
This commit is contained in:
@@ -756,8 +756,13 @@ static void tcpip_adapter_dhcpc_cb(struct netif *netif)
|
||||
ip4_addr_set(&ip_info->gw, ip_2_ip4(&netif->gw));
|
||||
|
||||
//notify event
|
||||
evt.event_id = SYSTEM_EVENT_STA_GOT_IP;
|
||||
evt.event_info.got_ip.ip_changed = false;
|
||||
if (tcpip_if == TCPIP_ADAPTER_IF_ETH) {
|
||||
evt.event_id = SYSTEM_EVENT_ETH_GOT_IP;
|
||||
evt.event_info.got_ip.ip_changed = true;
|
||||
} else {
|
||||
evt.event_id = SYSTEM_EVENT_STA_GOT_IP;
|
||||
evt.event_info.got_ip.ip_changed = false;
|
||||
}
|
||||
|
||||
if (memcmp(ip_info, ip_info_old, sizeof(tcpip_adapter_ip_info_t))) {
|
||||
evt.event_info.got_ip.ip_changed = true;
|
||||
|
Reference in New Issue
Block a user