Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 06/17] ap: add frequency to AP interface
Date: Tue,  1 Nov 2022 13:17:36 -0700	[thread overview]
Message-ID: <20221101201747.143379-6-prestwoj@gmail.com> (raw)
In-Reply-To: <20221101201747.143379-1-prestwoj@gmail.com>

---
 src/ap.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/ap.c b/src/ap.c
index 834fa089..baf90c1b 100644
--- a/src/ap.c
+++ b/src/ap.c
@@ -3676,6 +3676,9 @@ static void ap_if_event_func(enum ap_event_type type, const void *event_data,
 		l_dbus_property_changed(dbus_get_bus(),
 					netdev_get_path(ap_if->netdev),
 					IWD_AP_INTERFACE, "Name");
+		l_dbus_property_changed(dbus_get_bus(),
+					netdev_get_path(ap_if->netdev),
+					IWD_AP_INTERFACE, "Frequency");
 
 		l_rtnl_set_linkmode_and_operstate(rtnl,
 					netdev_get_ifindex(ap_if->netdev),
@@ -4026,6 +4029,24 @@ static bool ap_dbus_property_get_scanning(struct l_dbus *dbus,
 	return true;
 }
 
+static bool ap_dbus_property_get_freq(struct l_dbus *dbus,
+					struct l_dbus_message *message,
+					struct l_dbus_message_builder *builder,
+					void *user_data)
+{
+	struct ap_if_data *ap_if = user_data;
+	uint32_t freq;
+
+	if (!ap_if->ap || !ap_if->ap->started)
+		return false;
+
+	freq = band_channel_to_freq(ap_if->ap->channel, BAND_FREQ_2_4_GHZ);
+
+	l_dbus_message_builder_append_basic(builder, 'u', &freq);
+
+	return true;
+}
+
 static void ap_setup_interface(struct l_dbus_interface *interface)
 {
 	l_dbus_interface_method(interface, "Start", 0, ap_dbus_start, "",
@@ -4045,6 +4066,8 @@ static void ap_setup_interface(struct l_dbus_interface *interface)
 					ap_dbus_property_get_name, NULL);
 	l_dbus_interface_property(interface, "Scanning", 0, "b",
 					ap_dbus_property_get_scanning, NULL);
+	l_dbus_interface_property(interface, "Frequency", 0, "u",
+					ap_dbus_property_get_freq, NULL);
 }
 
 static void ap_destroy_interface(void *user_data)
-- 
2.34.3


  parent reply	other threads:[~2022-11-01 20:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01 20:17 [PATCH 01/17] wiphy: add wiphy_get_supported_ciphers James Prestwood
2022-11-01 20:17 ` [PATCH 02/17] ie: add group/pairwise lists of supported ciphers James Prestwood
2022-11-01 20:17 ` [PATCH 03/17] ap: add profile settings PairwiseCiphers/GroupCipher James Prestwood
2022-11-01 20:17 ` [PATCH 04/17] p2p: limit ciphers to CCMP/TKIP James Prestwood
2022-11-01 20:17 ` [PATCH 05/17] doc: document PairwiseCiphers/GroupCiphers AP settings James Prestwood
2022-11-01 20:17 ` James Prestwood [this message]
2022-11-01 20:50   ` [PATCH 06/17] ap: add frequency to AP interface Denis Kenzior
2022-11-01 20:17 ` [PATCH 07/17] client: show frequency with ap show James Prestwood
2022-11-01 20:17 ` [PATCH 08/17] ap: add PairwiseCiphers/GroupCipher to dbus interface James Prestwood
2022-11-01 20:17 ` [PATCH 09/17] client: add ap support for PairwiseCiphers/GroupCipher James Prestwood
2022-11-01 20:17 ` [PATCH 10/17] hwsim: add remaining ciphers to supported list James Prestwood
2022-11-01 20:51   ` Denis Kenzior
2022-11-01 20:17 ` [PATCH 11/17] auto-t: test AP fails to start with unsupported ciphers James Prestwood
2022-11-01 20:17 ` [PATCH 12/17] auto-t: fix testAP-no-support disabled ciphers James Prestwood
2022-11-01 20:52   ` Denis Kenzior
2022-11-01 20:17 ` [PATCH 13/17] netdev: add more info to key setting debug messages James Prestwood
2022-11-01 20:53   ` Denis Kenzior
2022-11-01 20:17 ` [PATCH 14/17] netdev: fix key setting for authenticators James Prestwood
2022-11-01 20:17 ` [PATCH 15/17] nl80211util: add key type/idx to nl80211_parse_attrs James Prestwood
2022-11-01 20:56   ` Denis Kenzior
2022-11-01 20:17 ` [PATCH 16/17] netdev: parse michael MIC failure message James Prestwood
2022-11-01 20:17 ` [PATCH 17/17] auto-t: add AP test for all pairwise/group cipher combos 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=20221101201747.143379-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