sta: add sta_connection_state enum
[project/usteer.git] / sta.c
diff --git a/sta.c b/sta.c
index 869019d7ad872e113356012800c497fca94c6309..959cff59ae33a170a6c2b1ce625ca64f197af60a 100644 (file)
--- a/sta.c
+++ b/sta.c
@@ -111,7 +111,7 @@ usteer_sta_info_get(struct sta *sta, struct usteer_node *node, bool *create)
 void
 usteer_sta_info_update_timeout(struct sta_info *si, int timeout)
 {
-       if (si->connected == 1)
+       if (si->connected == STA_CONNECTED)
                usteer_timeout_cancel(&tq, &si->timeout);
        else if (timeout > 0)
                usteer_timeout_set(&tq, &si->timeout, timeout);
@@ -145,7 +145,7 @@ void
 usteer_sta_info_update(struct sta_info *si, int signal, bool avg)
 {
        /* ignore probe request signal when connected */
-       if (si->connected == 1 && si->signal != NO_SIGNAL && !avg)
+       if (si->connected == STA_CONNECTED && si->signal != NO_SIGNAL && !avg)
                signal = NO_SIGNAL;
 
        if (signal != NO_SIGNAL)