1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

xbee: provide device type on get()

This commit is contained in:
Martine Lenders 2017-11-14 11:51:10 +01:00
parent 2154420b12
commit 4682c129e3
No known key found for this signature in database
GPG Key ID: 8E97A9FE55F25D62

View File

@ -749,6 +749,10 @@ static int xbee_get(netdev_t *ndev, netopt_t opt, void *value, size_t max_len)
*((uint16_t *)value) = IEEE802154_SHORT_ADDRESS_LEN;
}
return sizeof(uint16_t);
case NETOPT_DEVICE_TYPE:
assert(max_len == sizeof(uint16_t));
*((uint16_t *)value) = NETDEV_TYPE_IEEE802154;
return sizeof(uint16_t);
case NETOPT_IPV6_IID:
if (max_len < sizeof(eui64_t)) {
return -EOVERFLOW;