From c8eb7fe66cb3c8fbefa00e5050758eaa1304d416 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 2 Jan 2020 20:33:01 +0200 Subject: [PATCH] Fix signal_poll based roaming skip 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 --- wpa_supplicant/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 9b3755113..d75a50eaf 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -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)",