1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

Merge pull request #8908 from miri64/netdev_tap/fix/set-opt-return

netdev_tap: fix return value of set option function
This commit is contained in:
Martine Lenders 2018-04-11 07:42:48 +02:00 committed by GitHub
commit 69350bf028
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,9 +141,11 @@ static int _set(netdev_t *dev, netopt_t opt, const void *value, size_t value_len
case NETOPT_ADDRESS:
assert(value_len >= ETHERNET_ADDR_LEN);
_set_mac_addr(dev, (const uint8_t*)value);
res = ETHERNET_ADDR_LEN;
break;
case NETOPT_PROMISCUOUSMODE:
_set_promiscous(dev, ((const bool *)value)[0]);
res = sizeof(netopt_enable_t);
break;
default:
res = netdev_eth_set(dev, opt, value, value_len);