1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
19646: drivers/sx126x: fix argument validation in spreading factor r=maribu a=maribu

### Contribution description

The lowest possible value is `LORA_SF5` and not `LORA_SF6`. This fixes the argument validation to allow setting `LORA_SF5` as spreading factor.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
This commit is contained in:
bors[bot] 2023-05-22 17:09:41 +00:00 committed by GitHub
commit 1324d29e59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -401,7 +401,7 @@ static int _set(netdev_t *netdev, netopt_t opt, const void *val, size_t len)
const uint8_t max_sf = sx126x_is_llcc68(dev)
? llcc68_max_sf
: sx126x_max_sf;
if ((sf < LORA_SF6) || (sf > max_sf)) {
if ((sf < LORA_SF5) || (sf > max_sf)) {
res = -EINVAL;
break;
}