From 6bf7c8ef5f0221395663357e5ac62f29de407ef9 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Sat, 31 Oct 2015 17:29:47 +0900 Subject: [PATCH] at86rf2xx: added protocol setter --- drivers/at86rf2xx/at86rf2xx_netdev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/at86rf2xx/at86rf2xx_netdev.c b/drivers/at86rf2xx/at86rf2xx_netdev.c index 09113bffb4..c0a35bcf36 100644 --- a/drivers/at86rf2xx/at86rf2xx_netdev.c +++ b/drivers/at86rf2xx/at86rf2xx_netdev.c @@ -644,6 +644,16 @@ static int _set(gnrc_netdev_t *device, netopt_t opt, void *val, size_t len) } break; + case NETOPT_PROTO: + if (len != sizeof(gnrc_nettype_t)) { + res = -EINVAL; + } + else { + dev->proto = (gnrc_nettype_t) val; + res = sizeof(gnrc_nettype_t); + } + break; + case NETOPT_CHANNEL: if (len != sizeof(uint16_t)) { res = -EINVAL;