continue;
if (current_time - remote_si->last_connected < config.roam_process_timeout) {
- rn->node.roam_source++;
+ rn->node.roam_events.source++;
/* Don't abort looking for roam sources here.
* The client might have roamed via another node
* within the roam-timeout.
{
uint64_t roamability_node, roamability_ref;
- roamability_node = ((uint64_t)(node->roam_source + node->roam_destination)) * current_time / ((current_time - node->created) + 1);
- roamability_ref = ((uint64_t)(ref->roam_source + ref->roam_destination)) * current_time / ((current_time - ref->created) + 1);
+ roamability_node = ((uint64_t)(node->roam_events.source + node->roam_events.target)) * current_time / ((current_time - node->created) + 1);
+ roamability_ref = ((uint64_t)(ref->roam_events.source + ref->roam_events.target)) * current_time / ((current_time - ref->created) + 1);
if (roamability_node < roamability_ref)
return ref;
void usteer_dump_node(struct blob_buf *buf, struct usteer_node *node)
{
- void *c;
+ void *c, *roam_events;
c = blobmsg_open_table(buf, usteer_node_name(node));
blobmsg_printf(buf, "bssid", MAC_ADDR_FMT, MAC_ADDR_DATA(node->bssid));
blobmsg_add_u32(buf, "noise", node->noise);
blobmsg_add_u32(buf, "load", node->load);
blobmsg_add_u32(buf, "max_assoc", node->max_assoc);
- blobmsg_add_u32(buf, "roam_source", node->roam_source);
- blobmsg_add_u32(buf, "roam_destination", node->roam_destination);
+
+ roam_events = blobmsg_open_table(buf, "roam_events");
+ blobmsg_add_u32(buf, "source", node->roam_events.source);
+ blobmsg_add_u32(buf, "target", node->roam_events.target);
+ blobmsg_close_table(buf, roam_events);
+
if (node->rrm_nr)
blobmsg_add_field(buf, BLOBMSG_TYPE_ARRAY, "rrm_nr",
blobmsg_data(node->rrm_nr),