From 184e411355cd966560a46a1986f9af901528fb48 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 09:32:42 +0200 Subject: [PATCH 1/4] drivers/netdev: add NETDEV_ESP_ETH type --- drivers/include/net/netdev.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/include/net/netdev.h b/drivers/include/net/netdev.h index 0942ae8fbf..e4d7b98952 100644 --- a/drivers/include/net/netdev.h +++ b/drivers/include/net/netdev.h @@ -329,6 +329,7 @@ typedef enum { NETDEV_ENCX24J600, NETDEV_ATWINC15X0, NETDEV_KW2XRF, + NETDEV_ESP_ETH, /* add more if needed */ } netdev_type_t; /** @} */ From 14dde4a83590e41ab6946072cd1133ce889c1a47 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 09:33:33 +0200 Subject: [PATCH 2/4] drivers/netdev: add NETDEV_ESP_WIFI type --- drivers/include/net/netdev.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/include/net/netdev.h b/drivers/include/net/netdev.h index e4d7b98952..9cc2d7bead 100644 --- a/drivers/include/net/netdev.h +++ b/drivers/include/net/netdev.h @@ -330,6 +330,7 @@ typedef enum { NETDEV_ATWINC15X0, NETDEV_KW2XRF, NETDEV_ESP_ETH, + NETDEV_ESP_WIFI, /* add more if needed */ } netdev_type_t; /** @} */ From 2d3bb5148832ad4d8f9095a518f9bd129c1c59f3 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 09:34:35 +0200 Subject: [PATCH 3/4] cpu/esp32: add netdev_register for NETDEV_ESP_ETH --- cpu/esp32/esp-eth/esp_eth_netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu/esp32/esp-eth/esp_eth_netdev.c b/cpu/esp32/esp-eth/esp_eth_netdev.c index b04a1c0b95..86920fa0fa 100644 --- a/cpu/esp32/esp-eth/esp_eth_netdev.c +++ b/cpu/esp32/esp-eth/esp_eth_netdev.c @@ -458,6 +458,8 @@ void esp_eth_setup(esp_eth_netdev_t* dev) _esp_eth_dev.link_up = false; _esp_eth_dev.rx_len = 0; _esp_eth_dev.tx_len = 0; + + netdev_register(&dev->netdev, NETDEV_ESP_ETH, 0); } #endif /* MODULE_ESP_ETH */ From da83c300215c3bc69d6940f5338af400efb5b13c Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 2 Aug 2022 09:34:59 +0200 Subject: [PATCH 4/4] cpu/esp_common: add netdev_register for NETDEV_ESP_WIFI --- cpu/esp_common/esp-wifi/esp_wifi_netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu/esp_common/esp-wifi/esp_wifi_netdev.c b/cpu/esp_common/esp-wifi/esp_wifi_netdev.c index a621cbbce6..f496e2d83a 100644 --- a/cpu/esp_common/esp-wifi/esp_wifi_netdev.c +++ b/cpu/esp_common/esp-wifi/esp_wifi_netdev.c @@ -983,6 +983,8 @@ void esp_wifi_setup (esp_wifi_netdev_t* dev) dev->event_disc = 0; dev->connected = false; #endif /* MODULE_ESP_WIFI_AP */ + + netdev_register(&dev->netdev, NETDEV_ESP_WIFI, 0); } #endif /* MODULE_ESP_WIFI */