at86rf2xx: added protocol setter

This commit is contained in:
Oleg Hahm 2015-10-31 17:29:47 +09:00
parent 26e67b86b5
commit 6bf7c8ef5f
1 changed files with 10 additions and 0 deletions

View File

@ -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;