diff mbox series

[4/7] network: add network_roamed

Message ID 20231220131200.267489-5-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series Reduce and optimize quick/roam scan frequencies | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood Dec. 20, 2023, 1:11 p.m. UTC
Allows known frequencies to include the roam BSS frequency and
sync.
---
 src/network.c | 9 +++++++++
 src/network.h | 1 +
 2 files changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/src/network.c b/src/network.c
index f4496c25..04d1bf82 100644
--- a/src/network.c
+++ b/src/network.c
@@ -204,6 +204,15 @@  void network_connected(struct network *network, struct scan_bss *bss)
 	network->provisioning_hidden = false;
 }
 
+void network_roamed(struct network *network, struct scan_bss *bss)
+{
+	if (network->info) {
+		known_network_add_connected_frequency(network->info,
+							bss->frequency);
+		known_network_frequency_sync(network->info);
+	}
+}
+
 void network_disconnected(struct network *network)
 {
 	network_settings_close(network);
diff --git a/src/network.h b/src/network.h
index e7638899..323f64a5 100644
--- a/src/network.h
+++ b/src/network.h
@@ -32,6 +32,7 @@  struct handshake_state;
 struct erp_cache_entry;
 
 void network_connected(struct network *network, struct scan_bss *bss);
+void network_roamed(struct network *network, struct scan_bss *bss);
 void network_disconnected(struct network *network);
 bool network_rankmod(const struct network *network, double *rankmod);