]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow roam to lower signal level if throughput benefit is significant
authorJouni Malinen <j@w1.fi>
Wed, 1 Jan 2020 15:09:18 +0000 (17:09 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 1 Jan 2020 15:09:18 +0000 (17:09 +0200)
Do not prevent roam to a different BSS based only on the signal level
with the current BSS being higher than with the selected BSS. If the
estimated throughput is significantly higher (> 20%), allow roaming if
the following conditions are met.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/events.c

index f7997d5fc2db73db7b68d93ff4ca90572c18532c..6478c34430153acc256965931ac86991eae6fbe7 100644 (file)
@@ -1796,7 +1796,8 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
 
        to_5ghz = selected->freq > 4000 && current_bss->freq < 4000;
 
-       if (cur_level < 0 && cur_level > selected->level + to_5ghz * 2) {
+       if (cur_level < 0 && cur_level > selected->level + to_5ghz * 2 &&
+           selected->est_throughput < cur_est * 1.2) {
                wpa_dbg(wpa_s, MSG_DEBUG, "Skip roam - Current BSS has better "
                        "signal level");
                return 0;