From: Jouni Malinen Date: Thu, 2 Jan 2020 18:33:01 +0000 (+0200) Subject: Fix signal_poll based roaming skip X-Git-Tag: hostap_2_10~2012 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8eb7fe66cb3c8fbefa00e5050758eaa1304d416;p=thirdparty%2Fhostap.git 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 --- 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)",