diff --git a/cpu/esp32/esp-now/esp_now_netdev.c b/cpu/esp32/esp-now/esp_now_netdev.c index e78c4d1de644..46b30fc9fecf 100644 --- a/cpu/esp32/esp-now/esp_now_netdev.c +++ b/cpu/esp32/esp-now/esp_now_netdev.c @@ -753,7 +753,7 @@ static int _get(netdev_t *netdev, netopt_t opt, void *val, size_t max_len) case NETOPT_DEVICE_TYPE: CHECK_PARAM_RET (max_len >= sizeof(uint16_t), -EOVERFLOW); - *((uint16_t *)val) = NETDEV_TYPE_RAW; + *((uint16_t *)val) = NETDEV_TYPE_ESP_NOW; res = sizeof(uint16_t); break; diff --git a/drivers/include/net/netdev.h b/drivers/include/net/netdev.h index 3bbf429510d4..3d201d13f0f2 100644 --- a/drivers/include/net/netdev.h +++ b/drivers/include/net/netdev.h @@ -217,6 +217,7 @@ enum { NETDEV_TYPE_LORA, NETDEV_TYPE_NRFMIN, NETDEV_TYPE_SLIP, + NETDEV_TYPE_ESP_NOW, }; /** diff --git a/sys/net/gnrc/netif/gnrc_netif.c b/sys/net/gnrc/netif/gnrc_netif.c index 225663a85085..2c31ef15f48d 100644 --- a/sys/net/gnrc/netif/gnrc_netif.c +++ b/sys/net/gnrc/netif/gnrc_netif.c @@ -879,7 +879,7 @@ int gnrc_netif_ipv6_get_iid(gnrc_netif_t *netif, eui64_t *eui64) return 0; #endif #if defined(MODULE_ESP_NOW) - case NETDEV_TYPE_RAW: + case NETDEV_TYPE_ESP_NOW: eui64->uint8[0] = netif->l2addr[0] ^ 0x02; eui64->uint8[1] = netif->l2addr[1]; eui64->uint8[2] = netif->l2addr[2]; diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.c b/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.c index 0659a3ad54b1..6cc1d45982e3 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.c @@ -70,7 +70,7 @@ static inline uint8_t _reverse_iid(const ipv6_addr_t *dst, return sizeof(uint8_t); #endif /* MODULE_CC110X */ #ifdef MODULE_ESP_NOW - case NETDEV_TYPE_RAW: + case NETDEV_TYPE_ESP_NOW: l2addr[0] = dst->u8[8] ^ 0x02; l2addr[1] = dst->u8[9]; l2addr[2] = dst->u8[10]; diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c b/sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c index 99f69f4e99ea..4d7b36701c1c 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c @@ -205,7 +205,7 @@ static inline unsigned _get_l2addr_len(gnrc_netif_t *netif, } #endif /* defined(MODULE_NETDEV_IEEE802154) || defined(MODULE_XBEE) */ #ifdef MODULE_ESP_NOW - case NETDEV_TYPE_RAW: + case NETDEV_TYPE_ESP_NOW: (void)opt; return ETHERNET_ADDR_LEN; #endif /* MODULE_ESP_NOW */