1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

ng_at86rf2xx: add NETCONF_OPT_PROTO to _get

This commit is contained in:
Martine Lenders 2015-05-09 15:59:28 +02:00 committed by Martine Lenders
parent 53d2a0c3ec
commit e28a64f282

View File

@ -398,6 +398,13 @@ static int _get(ng_netdev_t *device, ng_netconf_opt_t opt,
*((uint16_t *)val) = dev->pan;
return sizeof(uint16_t);
case NETCONF_OPT_PROTO:
if (max_len < sizeof(ng_nettype_t)) {
return -EOVERFLOW;
}
*((ng_nettype_t *)val) = dev->proto;
return sizeof(ng_nettype_t);
case NETCONF_OPT_CHANNEL:
if (max_len < sizeof(uint16_t)) {
return -EOVERFLOW;