measurement: generalize measurement handling

Generalize measurement handling in a way that RCPi and RSNI are stored
regardless of the specific measurement type. This allows us to handle
link-measurement reports the same way as we already handle
beacon-reports.

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer
2022-04-01 00:19:59 +02:00
parent bb61f2a598
commit 7df969fd39
4 changed files with 13 additions and 18 deletions

4
ubus.c
View File

@@ -446,8 +446,8 @@ usteer_ubus_get_connected_clients(struct ubus_context *ctx, struct ubus_object *
list_for_each_entry(mr, &si->sta->measurements, sta_list) {
t = blobmsg_open_table(&b, "");
blobmsg_add_string(&b, "node", usteer_node_name(mr->node));
blobmsg_add_u32(&b, "rcpi", mr->beacon_report.rcpi);
blobmsg_add_u32(&b, "rsni", mr->beacon_report.rsni);
blobmsg_add_u32(&b, "rcpi", mr->rcpi);
blobmsg_add_u32(&b, "rsni", mr->rsni);
blobmsg_add_u64(&b, "timestamp", mr->timestamp);
blobmsg_close_table(&b, t);
}