usteer: expose STA link measurement capability

Indicate STA capability for handling link-measurement requests in
connected_clients output.

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer
2022-03-31 00:45:08 +02:00
parent f4e120c9a3
commit 4458b6f1bf
3 changed files with 10 additions and 0 deletions

6
sta.c
View File

@@ -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);

3
ubus.c
View File

@@ -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);

View File

@@ -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);