[PATCH 2/5] station: update SignalStrength/Frequency for BSS interface
James Prestwood <[email protected]> Wed, 23 Apr 2025 09:54:55 -0400
| Newsgroups | dev.linux.lists.iwd |
|---|---|
| Message-ID | <[email protected]> |
When the BSS's signal or frequency changes, update those properties
---
src/station.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/station.c b/src/station.c
index 14c93671..85ed2898 100644
--- a/src/station.c
+++ b/src/station.c
@@ -545,10 +545,21 @@ static bool station_register_bss(struct network *network, struct scan_bss *bss)
* scan_bss pointer, as this one will be freed soon.
*/
old = l_dbus_object_get_data(dbus_get_bus(), path, IWD_BSS_INTERFACE);
- if (old)
- return l_dbus_object_set_data(dbus_get_bus(), path,
+ if (old) {
+ l_dbus_object_set_data(dbus_get_bus(), path,
IWD_BSS_INTERFACE, bss);
+ if (old->signal_strength != bss->signal_strength)
+ l_dbus_property_changed(dbus_get_bus(), path,
+ IWD_BSS_INTERFACE, "SignalStrength");
+
+ if (old->frequency != bss->frequency)
+ l_dbus_property_changed(dbus_get_bus(), path,
+ IWD_BSS_INTERFACE, "Frequency");
+
+ return true;
+ }
+
if (!l_dbus_object_add_interface(dbus_get_bus(), path,
IWD_BSS_INTERFACE, bss))
return false;
--
2.34.1