Re: [PATCH 2/5] station: update SignalStrength/Frequency for BSS interface

Denis Kenzior <[email protected]> Wed, 23 Apr 2025 09:52:06 -0500
Newsgroups dev.linux.lists.iwd
Message-ID <[email protected]>
Hi James,

On 4/23/25 8:54 AM, James Prestwood wrote:
> 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;

nit: This return probably deserves its own commit + Fixes tag.

> +	}
> +
>   	if (!l_dbus_object_add_interface(dbus_get_bus(), path,
>   						IWD_BSS_INTERFACE, bss))
>   		return false;

Regards,
-Denis