From d0b9fc84b561b7c7116987ef1871de1f1a5d20de Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 24 Oct 2024 09:46:33 -0700 Subject: [PATCH] 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. --- src/band.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/band.c b/src/band.c index 4e8eb9b0..09b2d932 100644 --- 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)