[openwrt/openwrt] hostapd: add STA extended capabilities to get_clients
LEDE Commits
lede-commits at lists.infradead.org
Sat Feb 19 07:15:18 PST 2022
blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6f787239771044ed7eeaf22301c543b699f25cb4
commit 6f787239771044ed7eeaf22301c543b699f25cb4
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Feb 16 23:09:51 2022 +0100
hostapd: add STA extended capabilities to get_clients
Add the STAs extended capabilities to the ubus STA information. This
way, external daemons can be made aware of a STAs capabilities.
This field is of an array type and contains 0 or more bytes of a STAs
advertised extended capabilities.
Signed-off-by: David Bauer <mail at david-bauer.net>
---
package/network/services/hostapd/src/src/ap/ubus.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index fdc2a3fd26..bdab8fa7b8 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -322,6 +322,16 @@ hostapd_bss_get_clients(struct ubus_context *ctx, struct ubus_object *obj,
for (i = 0; i < ARRAY_SIZE(sta->rrm_enabled_capa); i++)
blobmsg_add_u32(&b, "", sta->rrm_enabled_capa[i]);
blobmsg_close_array(&b, r);
+
+ r = blobmsg_open_array(&b, "extended_capabilities");
+ /* Check if client advertises extended capabilities */
+ if (sta->ext_capability && sta->ext_capability[0] > 0) {
+ for (i = 0; i < sta->ext_capability[0]; i++) {
+ blobmsg_add_u32(&b, "", sta->ext_capability[1 + i]);
+ }
+ }
+ blobmsg_close_array(&b, r);
+
blobmsg_add_u32(&b, "aid", sta->aid);
#ifdef CONFIG_TAXONOMY
r = blobmsg_alloc_string_buffer(&b, "signature", 1024);
More information about the lede-commits
mailing list