remote: close file on usteer_init_local_id fread fail
[project/usteer.git] / usteer.h
index 70663552888699a7eecba566847857234e62d86e..f692fb8665cd160f3d4315dd862db5ee8caec018 100644 (file)
--- a/usteer.h
+++ b/usteer.h
@@ -160,6 +160,7 @@ struct usteer_config {
        uint32_t measurement_report_timeout;
 
        bool assoc_steering;
+       bool probe_steering;
 
        uint32_t max_neighbor_reports;
 
@@ -191,6 +192,8 @@ struct usteer_config {
        uint32_t band_steering_interval;
        int32_t band_steering_min_snr; 
 
+       uint32_t link_measurement_interval;
+
        uint32_t initial_connect_delay;
 
        bool load_kick_enabled;
@@ -238,11 +241,15 @@ struct sta_info {
        struct sta_info_stats stats[__EVENT_TYPE_MAX];
        uint64_t created;
        uint64_t seen;
+
+       uint64_t connected_since;
        uint64_t last_connected;
+
        int signal;
 
        uint8_t rrm;
        bool bss_transition;
+       bool mbo;
 
        enum roam_trigger_state roam_state;
        uint8_t roam_tries;
@@ -281,11 +288,6 @@ struct sta {
        uint8_t addr[6];
 };
 
-struct usteer_beacon_report {
-       uint8_t rcpi;
-       uint8_t rsni;
-};
-
 struct usteer_measurement_report {
        struct usteer_timeout timeout;
 
@@ -299,7 +301,8 @@ struct usteer_measurement_report {
 
        uint64_t timestamp;
 
-       struct usteer_beacon_report beacon_report;
+       uint8_t rcpi;
+       uint8_t rsni;
 };
 
 extern struct ubus_context *ubus_ctx;
@@ -324,6 +327,7 @@ void usteer_local_node_kick(struct usteer_local_node *ln);
 int usteer_local_node_get_beacon_interval(struct usteer_local_node *ln);
 
 bool usteer_policy_node_below_max_assoc(struct usteer_node *node);
+bool usteer_policy_can_perform_roam(struct sta_info *si);
 
 void usteer_band_steering_perform_steer(struct usteer_local_node *ln);
 void usteer_band_steering_sta_update(struct sta_info *si);
@@ -332,13 +336,13 @@ bool usteer_band_steering_is_target(struct usteer_local_node *ln, struct usteer_
 void usteer_ubus_init(struct ubus_context *ctx);
 void usteer_ubus_kick_client(struct sta_info *si);
 int usteer_ubus_trigger_client_scan(struct sta_info *si);
-int usteer_ubus_notify_client_disassoc(struct sta_info *si);
 int usteer_ubus_band_steering_request(struct sta_info *si);
 int usteer_ubus_bss_transition_request(struct sta_info *si,
                                       uint8_t dialog_token,
                                       bool disassoc_imminent,
                                       bool abridged,
-                                      uint8_t validity_period);
+                                      uint8_t validity_period,
+                                      struct usteer_node *target_node);
 
 struct sta *usteer_sta_get(const uint8_t *addr, bool create);
 struct sta_info *usteer_sta_info_get(struct sta *sta, struct usteer_node *node, bool *create);
@@ -384,12 +388,16 @@ void usteer_run_hook(const char *name, const char *arg);
 void usteer_dump_node(struct blob_buf *buf, struct usteer_node *node);
 void usteer_dump_host(struct blob_buf *buf, struct usteer_remote_host *host);
 
+int usteer_measurement_get_rssi(struct usteer_measurement_report *report);
+
 struct usteer_measurement_report * usteer_measurement_report_get(struct sta *sta, struct usteer_node *node, bool create);
 void usteer_measurement_report_node_cleanup(struct usteer_node *node);
 void usteer_measurement_report_sta_cleanup(struct sta *sta);
 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);
+
 
+int usteer_ubus_trigger_link_measurement(struct sta_info *si);
 #endif