public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 1/5] network: Add SignalStrength/Frequency properties to BSS interface
Date: Wed, 23 Apr 2025 09:51:07 -0500	[thread overview]
Message-ID: <f95cd199-5aea-4a7c-8f1a-35770bb24c5a@gmail.com> (raw)
In-Reply-To: <20250423135458.11337-1-prestwoj@gmail.com>

Hi James,

On 4/23/25 8:54 AM, James Prestwood wrote:
> This patch adds SignalStrength and Frequencies properties to the
> BSS interface, which will provide more information for individual
> BSS's.
> ---
>   src/network.c | 29 +++++++++++++++++++++++++++++
>   1 file changed, 29 insertions(+)
> 
> diff --git a/src/network.c b/src/network.c
> index 4602a110..2443d4c5 100644
> --- a/src/network.c
> +++ b/src/network.c
> @@ -2194,10 +2194,39 @@ static bool network_bss_property_get_address(struct l_dbus *dbus,
>   	return true;
>   }
>   
> +static bool network_bss_property_get_signal(struct l_dbus *dbus,

nit: Can we use ..._get_signal_strength here?

> +					struct l_dbus_message *message,
> +					struct l_dbus_message_builder *builder,
> +					void *user_data)
> +{
> +	struct scan_bss *bss = user_data;
> +	int16_t signal = bss->signal_strength / 100;
> +
> +	l_dbus_message_builder_append_basic(builder, 'n', &signal);
> +
> +	return true;
> +}
> +
> +static bool network_bss_property_get_freq(struct l_dbus *dbus,

nit: ..._get_frequency

> +					struct l_dbus_message *message,
> +					struct l_dbus_message_builder *builder,
> +					void *user_data)
> +{
> +	struct scan_bss *bss = user_data;
> +
> +	l_dbus_message_builder_append_basic(builder, 'u', &bss->frequency);
> +
> +	return true;
> +}
> +
>   static void setup_bss_interface(struct l_dbus_interface *interface)
>   {
>   	l_dbus_interface_property(interface, "Address", 0, "s",
>   					network_bss_property_get_address, NULL);
> +	l_dbus_interface_property(interface, "SignalStrength", 0, "n",
> +					network_bss_property_get_signal, NULL);
> +	l_dbus_interface_property(interface, "Frequency", 0, "u",
> +					network_bss_property_get_freq, NULL);
>   }
>   
>   static int network_init(void)

Regards,
-Denis

      parent reply	other threads:[~2025-04-23 14:51 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
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 ` Denis Kenzior [this message]

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=f95cd199-5aea-4a7c-8f1a-35770bb24c5a@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.linux.dev \
    --cc=prestwoj@gmail.com \
    /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