diff --git a/drivers/ethos/ethos.c b/drivers/ethos/ethos.c index fa129ca401..630ee54526 100644 --- a/drivers/ethos/ethos.c +++ b/drivers/ethos/ethos.c @@ -26,11 +26,11 @@ #include "periph/uart.h" #include "tsrb.h" #include "irq.h" -#include "luid.h" #include "net/netdev.h" #include "net/netdev/eth.h" #include "net/eui64.h" +#include "net/eui_provider.h" #include "net/ethernet.h" #ifdef USE_ETHOS_FOR_STDIO @@ -56,8 +56,6 @@ static const uint8_t _esc_delim[] = {ETHOS_ESC_CHAR, (ETHOS_FRAME_DELIMITER ^ 0x void ethos_setup(ethos_t *dev, const ethos_params_t *params, uint8_t idx, void *inbuf, size_t inbuf_size) { - (void)idx; - dev->netdev.driver = &netdev_driver_ethos; dev->uart = params->uart; dev->state = WAIT_FRAMESTART; @@ -69,7 +67,8 @@ void ethos_setup(ethos_t *dev, const ethos_params_t *params, uint8_t idx, tsrb_init(&dev->inbuf, inbuf, inbuf_size); mutex_init(&dev->out_mutex); - luid_get_eui48((eui48_t *) &dev->mac_addr); + netdev_register(&dev->netdev, NETDEV_ETHOS, idx); + netdev_eui48_get(&dev->netdev, (eui48_t *)&dev->mac_addr); uart_init(params->uart, params->baudrate, ethos_isr, (void*)dev); diff --git a/drivers/include/net/netdev.h b/drivers/include/net/netdev.h index 0f0a7903ba..0ad72e32f4 100644 --- a/drivers/include/net/netdev.h +++ b/drivers/include/net/netdev.h @@ -320,6 +320,7 @@ typedef enum { NETDEV_SOCKET_ZEP, NETDEV_SX126X, NETDEV_CC2420, + NETDEV_ETHOS, /* add more if needed */ } netdev_type_t; /** @} */