1
0
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:
Marian Buschsieweke 2022-07-11 17:30:06 +02:00 committed by GitHub
commit 997f3fc1f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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