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:
parent
53d2a0c3ec
commit
e28a64f282
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user