From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 1/7] known_network: rename known_network_add_frequency
Date: Wed, 20 Dec 2023 05:11:54 -0800 [thread overview]
Message-ID: <20231220131200.267489-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20231220131200.267489-1-prestwoj@gmail.com>
Rename to known_network_add_seen_frequency. This prepares to
differentiate between tracking frequencies based on a BSS being
seen versus being connected to. When a BSS has been connected to
that frequency should be preferred when roaming/quick scanning.
---
src/knownnetworks.c | 3 ++-
src/knownnetworks.h | 3 ++-
src/network.c | 6 +++---
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/knownnetworks.c b/src/knownnetworks.c
index 04ce74ec..eac6c66b 100644
--- a/src/knownnetworks.c
+++ b/src/knownnetworks.c
@@ -566,7 +566,8 @@ static bool known_frequency_match(const void *a, const void *b)
* Adds a frequency to the 'known' set of frequencies that this network
* operates on. The list is sorted according to most-recently seen
*/
-int known_network_add_frequency(struct network_info *info, uint32_t frequency)
+int known_network_add_seen_frequency(struct network_info *info,
+ uint32_t frequency)
{
struct known_frequency *known_freq;
diff --git a/src/knownnetworks.h b/src/knownnetworks.h
index e8ffac0b..d404b161 100644
--- a/src/knownnetworks.h
+++ b/src/knownnetworks.h
@@ -114,7 +114,8 @@ struct network_info *known_networks_find(const char *ssid,
struct scan_freq_set *known_networks_get_recent_frequencies(
uint8_t num_networks_tosearch);
-int known_network_add_frequency(struct network_info *info, uint32_t frequency);
+int known_network_add_seen_frequency(struct network_info *info,
+ uint32_t frequency);
void known_network_frequency_sync(struct network_info *info);
uint32_t known_networks_watch_add(known_networks_watch_func_t func,
diff --git a/src/network.c b/src/network.c
index 4723334e..3e8770bc 100644
--- a/src/network.c
+++ b/src/network.c
@@ -807,7 +807,7 @@ static void add_known_frequency(void *data, void *user_data)
struct scan_bss *bss = data;
struct network_info *info = user_data;
- known_network_add_frequency(info, bss->frequency);
+ known_network_add_seen_frequency(info, bss->frequency);
}
void network_set_info(struct network *network, struct network_info *info)
@@ -1094,7 +1094,7 @@ bool network_bss_add(struct network *network, struct scan_bss *bss)
return false;
if (network->info)
- known_network_add_frequency(network->info, bss->frequency);
+ known_network_add_seen_frequency(network->info, bss->frequency);
/* Done if BSS is not HS20 or we already have network_info set */
if (!bss->hs20_capable)
@@ -1131,7 +1131,7 @@ bool network_bss_update(struct network *network, struct scan_bss *bss)
/* Sync frequency for already known networks */
if (network->info) {
- known_network_add_frequency(network->info, bss->frequency);
+ known_network_add_seen_frequency(network->info, bss->frequency);
known_network_frequency_sync(network->info);
}
--
2.34.1
next prev parent reply other threads:[~2023-12-20 13:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 13:11 [PATCH 0/7] Reduce and optimize quick/roam scan frequencies James Prestwood
2023-12-20 13:11 ` James Prestwood [this message]
2023-12-22 22:09 ` [PATCH 1/7] known_network: rename known_network_add_frequency Denis Kenzior
2023-12-20 13:11 ` [PATCH 2/7] knownnetworks: add known_network_add_connected_frequency James Prestwood
2023-12-22 22:13 ` Denis Kenzior
2024-01-02 13:18 ` James Prestwood
2023-12-20 13:11 ` [PATCH 3/7] network: call network_connected with BSS James Prestwood
2023-12-20 13:11 ` [PATCH 4/7] network: add network_roamed James Prestwood
2023-12-20 13:11 ` [PATCH 5/7] station: use network_roamed James Prestwood
2023-12-20 13:11 ` [PATCH 6/7] auto-t: update known frequency test to check order James Prestwood
2023-12-20 13:12 ` [PATCH 7/7] knownnetworks: limit 5 recent frequencies per network 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=20231220131200.267489-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