at86rf2xx: dereference NETOPT_PROTO option

netopt_t options are passed as pointers to the driver.
This commit is contained in:
Oleg Hahm 2015-12-07 18:46:43 +01:00
parent 810c623092
commit 9a11aec32e

View File

@ -659,7 +659,7 @@ static int _set(gnrc_netdev_t *device, netopt_t opt, void *val, size_t len)
res = -EINVAL; res = -EINVAL;
} }
else { else {
dev->proto = (gnrc_nettype_t) val; dev->proto = *((gnrc_nettype_t*) val);
res = sizeof(gnrc_nettype_t); res = sizeof(gnrc_nettype_t);
} }
break; break;