diff options
author | David Bauer <mail@david-bauer.net> | 2022-02-16 23:09:51 +0100 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2022-03-20 01:32:36 +0100 |
commit | 180b750c02dd9dd066cf67ee7c3480eb0ec36b70 (patch) | |
tree | 9c451d8718332200b51fcc526bc9452cc9ae6241 /package/network | |
parent | 411c73f7486c9e16ade32222d30521e60ead5275 (diff) | |
download | upstream-180b750c02dd9dd066cf67ee7c3480eb0ec36b70.tar.gz upstream-180b750c02dd9dd066cf67ee7c3480eb0ec36b70.tar.bz2 upstream-180b750c02dd9dd066cf67ee7c3480eb0ec36b70.zip |
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@david-bauer.net>
(cherry picked from commit 6f787239771044ed7eeaf22301c543b699f25cb4)
Diffstat (limited to 'package/network')
-rw-r--r-- | package/network/services/hostapd/src/src/ap/ubus.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index 29a4af8ebd..6edafa538d 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -318,6 +318,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); |