policy: only send preferred candidate with transition request
[project/usteer.git] / sta.c
diff --git a/sta.c b/sta.c
index 9934ccfeedd8f9dc8387e95838d188192960f42d..740463dd2efe6c04f7874300ea1aed33967dfc18 100644 (file)
--- a/sta.c
+++ b/sta.c
@@ -149,6 +149,7 @@ usteer_sta_get(const uint8_t *addr, bool create)
 void usteer_sta_disconnected(struct sta_info *si)
 {
        si->connected = STA_NOT_CONNECTED;
+       si->kick_time = 0;
        usteer_sta_info_update_timeout(si, config.local_sta_timeout);
 }
 
@@ -159,8 +160,10 @@ usteer_sta_info_update(struct sta_info *si, int signal, bool avg)
        if (si->connected == STA_CONNECTED && si->signal != NO_SIGNAL && !avg)
                signal = NO_SIGNAL;
 
-       if (signal != NO_SIGNAL)
+       if (signal != NO_SIGNAL) {
                si->signal = signal;
+               usteer_band_steering_sta_update(si);
+       }
 
        si->seen = current_time;
 
@@ -224,6 +227,12 @@ usteer_sta_supports_beacon_measurement_mode(struct sta_info *si, enum usteer_bea
        return false;
 }
 
+bool
+usteer_sta_supports_link_measurement(struct sta_info *si)
+{
+       return si->rrm & (1 << 0);
+}
+
 static void __usteer_init usteer_sta_init(void)
 {
        usteer_timeout_init(&tq);