From: James Prestwood <prestwoj@gmail.com>
To: Denis Kenzior <denkenz@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 2/5] station: update SignalStrength/Frequency for BSS interface
Date: Wed, 23 Apr 2025 14:50:36 -0400 [thread overview]
Message-ID: <bc27b295-4c9e-467d-a2c3-4c8d7043e0a7@gmail.com> (raw)
In-Reply-To: <dfd01b68-2955-4fff-9f71-2e130e745c16@gmail.com>
On 4/23/25 10:52 AM, Denis Kenzior wrote:
> 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.
This specifically isn't fixing anything. I just needed to set the new
BSS object prior to emitting the property changed signal. Technically
this does change the function logic but we don't actually check the
return of station_register_bss() anywhere, this could just be made into
a void return I suppose if you'd like.
>
>> + }
>> +
>> if (!l_dbus_object_add_interface(dbus_get_bus(), path,
>> IWD_BSS_INTERFACE, bss))
>> return false;
>
> Regards,
> -Denis
next prev parent reply other threads:[~2025-04-23 18:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 13:54 [PATCH 1/5] network: Add SignalStrength/Frequency properties to BSS interface James Prestwood
2025-04-23 13:54 ` [PATCH 2/5] station: update SignalStrength/Frequency for " James Prestwood
2025-04-23 14:52 ` Denis Kenzior
2025-04-23 18:50 ` James Prestwood [this message]
2025-04-23 13:54 ` [PATCH 3/5] client: add SignalStrength/Frequency properties James Prestwood
2025-04-23 14:53 ` Denis Kenzior
2025-04-23 13:54 ` [PATCH 4/5] client: fix get-bss command spacing/footer James Prestwood
2025-04-23 13:54 ` [PATCH 5/5] doc: add new properties to BSS interface James Prestwood
2025-04-23 14:51 ` [PATCH 1/5] network: Add SignalStrength/Frequency " Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc27b295-4c9e-467d-a2c3-4c8d7043e0a7@gmail.com \
--to=prestwoj@gmail.com \
--cc=denkenz@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox