diff --git a/src/network.c b/src/network.c index 4cdcede2..5e21ad51 100644 --- a/src/network.c +++ b/src/network.c @@ -276,6 +276,13 @@ const unsigned char *network_get_psk(const struct network *network) return network->psk; } +int network_get_signal_strength(const struct network *network) +{ + struct scan_bss *best_bss = l_queue_peek_head(network->bss_list); + + return best_bss->signal_strength; +} + struct l_settings *network_get_settings(const struct network *network) { return network->settings; diff --git a/src/network.h b/src/network.h index 09de2b2a..8443ba7a 100644 --- a/src/network.h +++ b/src/network.h @@ -39,6 +39,7 @@ struct device *network_get_device(const struct network *network); const char *network_get_path(const struct network *network); enum security network_get_security(const struct network *network); const unsigned char *network_get_psk(const struct network *network); +int network_get_signal_strength(const struct network *network); struct l_settings *network_get_settings(const struct network *network); bool network_settings_load(struct network *network);