[BR_RSNI] = { .name = "rsni", .type = BLOBMSG_TYPE_INT16 },
};
struct blob_attr *tb[__BR_MAX];
-
- struct usteer_beacon_report br;
struct usteer_node *node;
uint8_t *addr;
struct sta *sta;
if (!node)
return 0;
- br.rcpi = (uint8_t)blobmsg_get_u16(tb[BR_RCPI]);
- br.rsni = (uint8_t)blobmsg_get_u16(tb[BR_RSNI]);
-
- usteer_measurement_report_add_beacon_report(sta, node, &br, current_time);
+ usteer_measurement_report_add(sta, node,
+ (uint8_t)blobmsg_get_u16(tb[BR_RCPI]),
+ (uint8_t)blobmsg_get_u16(tb[BR_RSNI]),
+ current_time);
return 0;
}
}
struct usteer_measurement_report *
-usteer_measurement_report_add_beacon_report(struct sta *sta, struct usteer_node *node,
- struct usteer_beacon_report *br, uint64_t timestamp)
+usteer_measurement_report_add(struct sta *sta, struct usteer_node *node,
+ uint8_t rcpi, uint8_t rsni, uint64_t timestamp)
{
struct usteer_measurement_report *mr = usteer_measurement_report_get(sta, node, true);
return NULL;
mr->timestamp = timestamp;
- memcpy(&mr->beacon_report, br, sizeof(*br));
+ mr->rsni = rsni;
+ mr->rcpi = rcpi;
return mr;
}
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);
}
uint8_t addr[6];
};
-struct usteer_beacon_report {
- uint8_t rcpi;
- uint8_t rsni;
-};
-
struct usteer_measurement_report {
struct usteer_timeout timeout;
uint64_t timestamp;
- struct usteer_beacon_report beacon_report;
+ uint8_t rcpi;
+ uint8_t rsni;
};
extern struct ubus_context *ubus_ctx;
void usteer_measurement_report_del(struct usteer_measurement_report *mr);
struct usteer_measurement_report *
-usteer_measurement_report_add_beacon_report(struct sta *sta, struct usteer_node *node, struct usteer_beacon_report *br, uint64_t timestamp);
+usteer_measurement_report_add(struct sta *sta, struct usteer_node *node, uint8_t rcpi, uint8_t rsni, uint64_t timestamp);
#endif