From e28a64f2827db6043526b095d599114ac04a506c Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Sat, 9 May 2015 15:59:28 +0200 Subject: [PATCH] ng_at86rf2xx: add NETCONF_OPT_PROTO to _get --- drivers/ng_at86rf2xx/ng_at86rf2xx_netdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/ng_at86rf2xx/ng_at86rf2xx_netdev.c b/drivers/ng_at86rf2xx/ng_at86rf2xx_netdev.c index cec284c901..26bdb98c95 100644 --- a/drivers/ng_at86rf2xx/ng_at86rf2xx_netdev.c +++ b/drivers/ng_at86rf2xx/ng_at86rf2xx_netdev.c @@ -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;