From 4458b6f1bf8e3171e3aeb773bd45206b0280ef91 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 31 Mar 2022 00:45:08 +0200 Subject: [PATCH] usteer: expose STA link measurement capability Indicate STA capability for handling link-measurement requests in connected_clients output. Signed-off-by: David Bauer --- sta.c | 6 ++++++ ubus.c | 3 +++ usteer.h | 1 + 3 files changed, 10 insertions(+) diff --git a/sta.c b/sta.c index 9c11bc3..740463d 100644 --- a/sta.c +++ b/sta.c @@ -227,6 +227,12 @@ usteer_sta_supports_beacon_measurement_mode(struct sta_info *si, enum usteer_bea return false; } +bool +usteer_sta_supports_link_measurement(struct sta_info *si) +{ + return si->rrm & (1 << 0); +} + static void __usteer_init usteer_sta_init(void) { usteer_timeout_init(&tq); diff --git a/ubus.c b/ubus.c index 672c990..95614b9 100644 --- a/ubus.c +++ b/ubus.c @@ -435,6 +435,9 @@ usteer_ubus_get_connected_clients(struct ubus_context *ctx, struct ubus_object * blobmsg_add_string(&b, "", "TABLE"); blobmsg_close_array(&b, a); + /* Link-Measurement support */ + blobmsg_add_u8(&b, "link-measurement", usteer_sta_supports_link_measurement(si)); + /* BSS-Transition support */ blobmsg_add_u8(&b, "bss-transition-management", si->bss_transition); diff --git a/usteer.h b/usteer.h index 9d9693f..7066355 100644 --- a/usteer.h +++ b/usteer.h @@ -344,6 +344,7 @@ struct sta *usteer_sta_get(const uint8_t *addr, bool create); struct sta_info *usteer_sta_info_get(struct sta *sta, struct usteer_node *node, bool *create); bool usteer_sta_supports_beacon_measurement_mode(struct sta_info *si, enum usteer_beacon_measurement_mode mode); +bool usteer_sta_supports_link_measurement(struct sta_info *si); void usteer_sta_disconnected(struct sta_info *si); void usteer_sta_info_update_timeout(struct sta_info *si, int timeout); -- 2.30.2