mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge #19646
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:
commit
1324d29e59
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user