ubus: add supported beacon-measurement modes
authorDavid Bauer <mail@david-bauer.net>
Fri, 18 Feb 2022 22:45:58 +0000 (23:45 +0100)
committerDavid Bauer <mail@david-bauer.net>
Sat, 19 Feb 2022 15:10:33 +0000 (16:10 +0100)
Signed-off-by: David Bauer <mail@david-bauer.net>
ubus.c

diff --git a/ubus.c b/ubus.c
index 8527851e9e1712edb7ea06fb1dc439a5bb7c2e39..b8697950ac75aa10c59bb3ee3207c461e3dd7111 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -421,6 +421,16 @@ usteer_ubus_get_connected_clients(struct ubus_context *ctx, struct ubus_object *
                        blobmsg_add_u64(&b, "timestamp", si->bss_transition_response.timestamp);
                        blobmsg_close_table(&b, t);
 
+                       /* Beacon measurement modes */
+                       a = blobmsg_open_array(&b, "beacon-measurement-modes");
+                       if (usteer_sta_supports_beacon_measurement_mode(si->sta, BEACON_MEASUREMENT_PASSIVE))
+                               blobmsg_add_string(&b, "", "PASSIVE");
+                       if (usteer_sta_supports_beacon_measurement_mode(si->sta, BEACON_MEASUREMENT_ACTIVE))
+                               blobmsg_add_string(&b, "", "ACTIVE");
+                       if (usteer_sta_supports_beacon_measurement_mode(si->sta, BEACON_MEASUREMENT_TABLE))
+                               blobmsg_add_string(&b, "", "TABLE");
+                       blobmsg_close_array(&b, a);
+
                        /* Measurements */
                        a = blobmsg_open_array(&b, "measurements");
                        list_for_each_entry(mr, &si->sta->measurements, sta_list) {