diff --git a/drivers/netdev_eth/netdev_eth.c b/drivers/netdev_eth/netdev_eth.c index ec54dc0cc8ae15eecda8def83240813a78557736..1b94991b5c5e68ed3504212517ee0733f309baa2 100644 --- a/drivers/netdev_eth/netdev_eth.c +++ b/drivers/netdev_eth/netdev_eth.c @@ -22,6 +22,7 @@ #include <errno.h> #include "net/netdev.h" +#include "net/eui48.h" #include "net/eui64.h" #include "net/ethernet.h" @@ -34,9 +35,9 @@ static int _get_iid(netdev_t *netdev, eui64_t *value, size_t max_len) return -EOVERFLOW; } - uint8_t addr[ETHERNET_ADDR_LEN]; - netdev->driver->get(netdev, NETOPT_ADDRESS, addr, ETHERNET_ADDR_LEN); - ethernet_get_iid(value, addr); + eui48_t mac; + netdev->driver->get(netdev, NETOPT_ADDRESS, mac.uint8, sizeof(eui48_t)); + eui48_to_ipv6_iid(value, &mac); return sizeof(eui64_t); }