diff --git a/drivers/w5100/w5100.c b/drivers/w5100/w5100.c index d5c2b4bd59a1..50be84546029 100644 --- a/drivers/w5100/w5100.c +++ b/drivers/w5100/w5100.c @@ -23,9 +23,9 @@ #include #include "log.h" -#include "luid.h" #include "assert.h" +#include "net/eui_provider.h" #include "net/ethernet.h" #include "net/netdev/eth.h" @@ -134,7 +134,7 @@ static int init(netdev_t *netdev) { w5100_t *dev = (w5100_t *)netdev; uint8_t tmp; - uint8_t hwaddr[ETHERNET_ADDR_LEN]; + eui48_t hwaddr; /* get access to the SPI bus for the duration of this function */ spi_acquire(dev->p.spi, dev->p.cs, SPI_CONF, dev->p.clk); @@ -152,9 +152,8 @@ static int init(netdev_t *netdev) while (rreg(dev, REG_MODE) & MODE_RESET) {} /* initialize the device, start with writing the MAC address */ - luid_get(hwaddr, ETHERNET_ADDR_LEN); - hwaddr[0] &= ~0x03; /* no group address and not globally unique */ - wchunk(dev, REG_SHAR0, hwaddr, ETHERNET_ADDR_LEN); + netdev_eui48_get(netdev, &hwaddr); + wchunk(dev, REG_SHAR0, hwaddr.uint8, sizeof(hwaddr)); /* configure all memory to be used by socket 0 */ wreg(dev, REG_RMSR, RMSR_8KB_TO_S0);