default to the last specified frequency range

This was supposed to be the default, but there was a bug that looked
past the last range.
This commit is contained in:
Michael Ossmann
2021-12-12 13:29:25 -07:00
parent d0c0270b9c
commit 8cd5d682b8

View File

@ -313,6 +313,10 @@ uint8_t operacake_set_range(uint32_t freq_mhz) {
break;
}
}
/* Use the last range if there was no match. */
if (range == range_idx) {
range--;
}
if(range == current_range) {
return 1;
}