return NULL;
}
-static int
-snr_to_signal(struct usteer_node *node, int snr)
+int
+usteer_snr_to_signal(struct usteer_node *node, int snr)
{
int noise = -95;
*
* Otherwise, the client potentially ends up in a assoc - kick loop.
*/
- if (config.min_snr && si->signal < snr_to_signal(si->node, config.min_snr)) {
+ if (config.min_snr && si->signal < usteer_snr_to_signal(si->node, config.min_snr)) {
ev.reason = UEV_REASON_LOW_SIGNAL;
ev.threshold.cur = si->signal;
- ev.threshold.ref = snr_to_signal(si->node, config.min_snr);
+ ev.threshold.ref = usteer_snr_to_signal(si->node, config.min_snr);
ret = false;
goto out;
} else if (!config.assoc_steering) {
}
}
- min_signal = snr_to_signal(si->node, config.min_connect_snr);
+ min_signal = usteer_snr_to_signal(si->node, config.min_connect_snr);
if (si->signal < min_signal) {
ev.reason = UEV_REASON_LOW_SIGNAL;
ev.threshold.cur = si->signal;
};
int min_signal;
- min_signal = snr_to_signal(si->node, config.roam_trigger_snr);
+ min_signal = usteer_snr_to_signal(si->node, config.roam_trigger_snr);
switch (si->roam_state) {
case ROAM_TRIGGER_SCAN:
return;
usteer_update_time();
- min_signal = snr_to_signal(&ln->node, min_signal);
+ min_signal = usteer_snr_to_signal(&ln->node, min_signal);
list_for_each_entry(si, &ln->node.sta_info, node_list) {
if (si->connected != STA_CONNECTED || si->signal >= min_signal ||
if (!config.min_snr)
return;
- min_signal = snr_to_signal(&ln->node, config.min_snr);
+ min_signal = usteer_snr_to_signal(&ln->node, config.min_snr);
ev.threshold.ref = min_signal;
list_for_each_entry(si, &ln->node.sta_info, node_list) {
bool usteer_handle_sta_event(struct usteer_node *node, const uint8_t *addr,
enum usteer_event_type type, int freq, int signal);
+int usteer_snr_to_signal(struct usteer_node *node, int snr);
+
void usteer_local_nodes_init(struct ubus_context *ctx);
void usteer_local_node_kick(struct usteer_local_node *ln);