From 9a11aec32e353993eaadff453d8c9b0a7000fa8d Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Mon, 7 Dec 2015 18:46:43 +0100 Subject: [PATCH] at86rf2xx: dereference NETOPT_PROTO option netopt_t options are passed as pointers to the driver. --- drivers/at86rf2xx/at86rf2xx_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/at86rf2xx/at86rf2xx_netdev.c b/drivers/at86rf2xx/at86rf2xx_netdev.c index 80f091e6f6..4ba48c44dc 100644 --- a/drivers/at86rf2xx/at86rf2xx_netdev.c +++ b/drivers/at86rf2xx/at86rf2xx_netdev.c @@ -659,7 +659,7 @@ static int _set(gnrc_netdev_t *device, netopt_t opt, void *val, size_t len) res = -EINVAL; } else { - dev->proto = (gnrc_nettype_t) val; + dev->proto = *((gnrc_nettype_t*) val); res = sizeof(gnrc_nettype_t); } break;