From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH v2 06/13] station: add ConnectedAccessPoint property
Date: Thu, 8 Aug 2024 10:42:29 -0700 [thread overview]
Message-ID: <20240808174236.218750-6-prestwoj@gmail.com> (raw)
In-Reply-To: <20240808174236.218750-1-prestwoj@gmail.com>
This property is a path that corresponds to a BasicServiceSet
object, the one the station is currently connected to.
---
src/station.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
v2:
* Renamed ConnectedBss to ConnectedAccessPoint
diff --git a/src/station.c b/src/station.c
index 8a76339c..5524943b 100644
--- a/src/station.c
+++ b/src/station.c
@@ -4376,6 +4376,23 @@ static bool station_property_get_connected_network(struct l_dbus *dbus,
return true;
}
+static bool station_property_get_connected_ap(struct l_dbus *dbus,
+ struct l_dbus_message *message,
+ struct l_dbus_message_builder *builder,
+ void *user_data)
+{
+ struct station *station = user_data;
+
+ if (!station->connected_network)
+ return false;
+
+ l_dbus_message_builder_append_basic(builder, 'o',
+ network_bss_get_path(station->connected_network,
+ station->connected_bss));
+
+ return true;
+}
+
static bool station_property_get_scanning(struct l_dbus *dbus,
struct l_dbus_message *message,
struct l_dbus_message_builder *builder,
@@ -4783,6 +4800,9 @@ static void station_setup_interface(struct l_dbus_interface *interface)
l_dbus_interface_property(interface, "ConnectedNetwork", 0, "o",
station_property_get_connected_network,
NULL);
+ l_dbus_interface_property(interface, "ConnectedAccessPoint", 0, "o",
+ station_property_get_connected_ap,
+ NULL);
l_dbus_interface_property(interface, "Scanning", 0, "b",
station_property_get_scanning, NULL);
l_dbus_interface_property(interface, "State", 0, "s",
--
2.34.1
next prev parent reply other threads:[~2024-08-08 17:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 17:42 [PATCH v2 01/13] dbus: Add net.connman.iwd.BasicServiceSet interface James Prestwood
2024-08-08 17:42 ` [PATCH v2 02/13] network: Add BasicServiceSet object James Prestwood
2024-08-08 17:42 ` [PATCH v2 03/13] station: use network_bss_{start,stop}_update James Prestwood
2024-08-08 17:42 ` [PATCH v2 04/13] network: add ExtendedServiceSet DBus property James Prestwood
2024-08-08 17:42 ` [PATCH v2 05/13] network: remove network_bss_list_clear James Prestwood
2024-08-08 17:42 ` James Prestwood [this message]
2024-08-08 17:42 ` [PATCH v2 07/13] doc: document BasicServiceSet API James Prestwood
2024-08-08 17:42 ` [PATCH v2 08/13] client: separate property header and values into two functions James Prestwood
2024-08-08 17:42 ` [PATCH v2 09/13] client: add net.connman.iwd.BasicServiceSet definition James Prestwood
2024-08-08 17:42 ` [PATCH v2 10/13] client: Add BasicServiceSets property to network James Prestwood
2024-08-08 17:42 ` [PATCH v2 11/13] client: add BasicServiceSet interface James Prestwood
2024-08-08 17:42 ` [PATCH v2 12/13] client: refactor cmd_connect() and add find_network() James Prestwood
2024-08-08 17:42 ` [PATCH v2 13/13] client: add station command "get-bsses" James Prestwood
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=20240808174236.218750-6-prestwoj@gmail.com \
--to=prestwoj@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