[PATCH 4/7] network: add network_roamed

James Prestwood
2023-12-20T13:12:14Z

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 --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);

--
2.34.1