From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 2/2] station: contrain known frequencies before roam scan
Date: Mon, 10 Oct 2022 12:40:11 -0700 [thread overview]
Message-ID: <20221010194011.55962-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20221010194011.55962-1-prestwoj@gmail.com>
The known frequency list may include frequencies that once were
allowed but are now disabled due to regulatory restrictions. Don't
include these frequencies in the roam scan.
---
src/station.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/station.c b/src/station.c
index f138846d..986d6757 100644
--- a/src/station.c
+++ b/src/station.c
@@ -2659,12 +2659,17 @@ static int station_roam_scan_known_freqs(struct station *station)
station->connected_network);
struct scan_freq_set *freqs = network_info_get_roam_frequencies(info,
station->connected_bss->frequency, 5);
- int r;
+ int r = -ENODATA;
if (!freqs)
- return -ENODATA;
+ return r;
+
+ if (!wiphy_constrain_freq_set(station->wiphy, freqs))
+ goto free_set;
r = station_roam_scan(station, freqs);
+
+free_set:
scan_freq_set_free(freqs);
return r;
}
--
2.34.3
next prev parent reply other threads:[~2022-10-10 19:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 19:40 [PATCH 1/2] station: skip disabled frequencies in neighbor report James Prestwood
2022-10-10 19:40 ` James Prestwood [this message]
2022-10-11 19:31 ` Denis Kenzior
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=20221010194011.55962-2-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