Message ID | 20231220131200.267489-2-prestwoj@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Reduce and optimize quick/roam scan frequencies | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
prestwoj/iwd-alpine-ci-fetch | success | Fetch PR |
prestwoj/iwd-ci-fetch | success | Fetch PR |
prestwoj/iwd-ci-gitlint | success | GitLint |
prestwoj/iwd-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-alpine-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-ci-build | success | Build - Configure |
prestwoj/iwd-alpine-ci-build | success | Build - Configure |
prestwoj/iwd-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-ci-clang | success | clang PASS |
prestwoj/iwd-ci-makecheck | success | Make Check |
prestwoj/iwd-alpine-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-alpine-ci-makecheck | success | Make Check |
prestwoj/iwd-ci-incremental_build | success | Incremental Build with patches |
prestwoj/iwd-alpine-ci-incremental_build | success | Incremental Build with patches |
prestwoj/iwd-ci-testrunner | success | test-runner PASS |
Hi James, On 12/20/23 07:11, James Prestwood wrote: > 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. Okay, you assert this, but can you elaborate on how you came to this conclusion? I would think that adding a BSS you have seen recently in scan results should be preferred over one you might have connected to days earlier but haven't seen since. Regards, -Denis
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); }