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;
|
*((uint16_t *)val) = dev->pan;
|
||||||
return sizeof(uint16_t);
|
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:
|
case NETCONF_OPT_CHANNEL:
|
||||||
if (max_len < sizeof(uint16_t)) {
|
if (max_len < sizeof(uint16_t)) {
|
||||||
return -EOVERFLOW;
|
return -EOVERFLOW;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user