]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix signal_poll based roaming skip
authorJouni Malinen <j@w1.fi>
Thu, 2 Jan 2020 18:33:01 +0000 (20:33 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 2 Jan 2020 18:34:39 +0000 (20:34 +0200)
Fix a rebasing issue in the signal difference calculation. The older
patch was not updated to use the new cur_level local variable to get the
possibly updated signal level for the current BSS.

Fixes: a2c1bebd4301 ("Improve roaming logic")
Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/events.c

index 9b3755113de44468fdc761ca2af5cf4b42b7a305..d75a50eafe608d8a12f53990b0eb408dc18fc725 100644 (file)
@@ -1850,7 +1850,7 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
 
        if (to_5ghz)
                min_diff -= 2;
-       diff = selected->level - current_bss->level;
+       diff = selected->level - cur_level;
        if (diff < min_diff) {
                wpa_dbg(wpa_s, MSG_DEBUG,
                        "Skip roam - too small difference in signal level (%d < %d)",