mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #18305 from maribu/drivers/at86rf2xx
drivers/at86rf2xx: fix NETOPT_RANDOM
This commit is contained in:
commit
997f3fc1f4
@ -461,9 +461,8 @@ static int _get(netdev_t *netdev, netopt_t opt, void *val, size_t max_len)
|
||||
#endif /* MODULE_NETDEV_IEEE802154_OQPSK */
|
||||
#if AT86RF2XX_RANDOM_NUMBER_GENERATOR
|
||||
case NETOPT_RANDOM:
|
||||
assert(max_len >= sizeof(uint32_t));
|
||||
at86rf2xx_get_random(dev, (uint8_t*)val, sizeof(val));
|
||||
break;
|
||||
at86rf2xx_get_random(dev, (uint8_t*)val, max_len);
|
||||
return max_len;
|
||||
#endif
|
||||
default:
|
||||
res = -ENOTSUP;
|
||||
|
Loading…
Reference in New Issue
Block a user