commit d0b9fc84b561b7c7116987ef1871de1f1a5d20de
parent e0727bfeb64f2bd33f9e1a28bd59cf2706f9961d
Author: James Prestwood <prestwoj@gmail.com>
Date: Thu, 24 Oct 2024 09:46:33 -0700
band: check the operating class band before checking e4
After the band is established we check the e4 table for the channel
that matches. The problem here is we will end up checking all the
operating classes, even those that are not within the band that was
determined. This could result in false positives and return a
channel that doesn't make sense.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/band.c b/src/band.c
@@ -1352,6 +1352,10 @@ check_e4:
const struct operating_class_info *info =
&e4_operating_classes[i];
+ if (band != band_oper_class_to_band(NULL,
+ info->operating_class))
+ continue;
+
if (e4_has_frequency(info, freq) == 0 ||
e4_has_ccfi(info, freq) == 0) {
if (out_band)