local-node: periodically send link-measurement requests
Send link-measurement requests to every supporting local-sta in order to acquire information to assess the link-quality bi-directional. The link-measurement request is sent each configurable interval. It can be disabled by configuring the interval to 0. Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
29
local_node.c
29
local_node.c
@@ -659,6 +659,33 @@ usteer_local_node_state_next(struct uloop_timeout *timeout)
|
||||
ubus_complete_request_async(ubus_ctx, &ln->req);
|
||||
}
|
||||
|
||||
static void
|
||||
usteer_local_node_request_link_measurement(struct usteer_local_node *ln)
|
||||
{
|
||||
unsigned int min_count = DIV_ROUND_UP(config.link_measurement_interval, config.local_sta_update);
|
||||
struct usteer_node *node;
|
||||
struct sta_info *si;
|
||||
|
||||
node = &ln->node;
|
||||
|
||||
if (ln->link_measurement_tries < min_count) {
|
||||
ln->link_measurement_tries++;
|
||||
return;
|
||||
}
|
||||
|
||||
ln->link_measurement_tries = 0;
|
||||
|
||||
if (!config.link_measurement_interval)
|
||||
return;
|
||||
|
||||
list_for_each_entry(si, &node->sta_info, node_list) {
|
||||
if (si->connected != STA_CONNECTED)
|
||||
continue;
|
||||
|
||||
usteer_ubus_trigger_link_measurement(si);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
usteer_local_node_update(struct uloop_timeout *timeout)
|
||||
{
|
||||
@@ -680,6 +707,8 @@ usteer_local_node_update(struct uloop_timeout *timeout)
|
||||
uloop_timeout_set(&ln->req_timer, 1);
|
||||
usteer_local_node_kick(ln);
|
||||
usteer_band_steering_perform_steer(ln);
|
||||
usteer_local_node_request_link_measurement(ln);
|
||||
|
||||
uloop_timeout_set(timeout, config.local_sta_update);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user