mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'cleanup/netif_glue_cont' into 'master'
Cleanup/netif glue cont See merge request espressif/esp-idf!16403
This commit is contained in:
commit
da9a6d9082
@ -25,8 +25,6 @@ struct esp_eth_netif_glue_t {
|
|||||||
esp_event_handler_instance_t get_ip_ctx_handler;
|
esp_event_handler_instance_t get_ip_ctx_handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool s_netif_glue_legacy_events_registered = false;
|
|
||||||
|
|
||||||
static esp_err_t eth_input_to_netif(esp_eth_handle_t eth_handle, uint8_t *buffer, uint32_t length, void *priv)
|
static esp_err_t eth_input_to_netif(esp_eth_handle_t eth_handle, uint8_t *buffer, uint32_t length, void *priv)
|
||||||
{
|
{
|
||||||
return esp_netif_receive((esp_netif_t *)priv, buffer, length, NULL);
|
return esp_netif_receive((esp_netif_t *)priv, buffer, length, NULL);
|
||||||
@ -196,11 +194,10 @@ esp_eth_netif_glue_handle_t esp_eth_new_netif_glue(esp_eth_handle_t eth_hdl)
|
|||||||
netif_glue->base.post_attach = esp_eth_post_attach;
|
netif_glue->base.post_attach = esp_eth_post_attach;
|
||||||
esp_eth_increase_reference(eth_hdl);
|
esp_eth_increase_reference(eth_hdl);
|
||||||
|
|
||||||
if (s_netif_glue_legacy_events_registered == false) {
|
|
||||||
if (esp_eth_set_glue_instance_handlers(netif_glue) != ESP_OK) {
|
if (esp_eth_set_glue_instance_handlers(netif_glue) != ESP_OK) {
|
||||||
esp_eth_del_netif_glue(netif_glue);
|
esp_eth_del_netif_glue(netif_glue);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return netif_glue;
|
return netif_glue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user