From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 3/5] band: check the operating class band before checking e4
Date: Thu, 24 Oct 2024 09:46:33 -0700 [thread overview]
Message-ID: <20241024164635.176631-3-prestwoj@gmail.com> (raw)
In-Reply-To: <20241024164635.176631-1-prestwoj@gmail.com>
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)
--
2.34.1
next prev parent reply other threads:[~2024-10-24 16:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 16:46 [PATCH 1/5] band: correct oper class 136 starting frequency James Prestwood
2024-10-24 16:46 ` [PATCH 2/5] nl80211util: check band when parsing supported frequencies James Prestwood
2024-10-24 16:46 ` James Prestwood [this message]
2024-10-24 16:46 ` [PATCH 4/5] scan: warn on zero frequency when adding to request James Prestwood
2024-10-24 17:13 ` Denis Kenzior
2024-10-24 16:46 ` [PATCH 5/5] util: warn on invalid channels when iterating a frequency set James Prestwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241024164635.176631-3-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox