Make it a bit easier to roam from 2.4 GHz to 5 GHz within ESS
The initial connection to an ESS was already explicitly increasing the likelihood of picking a 5 GHz BSS. While the throughput estimation is likely to do same for the roaming decision, it might be possible that that does not cover all cases. Add couple of dB extra preference for 5 GHz in case the roaming decision falls back to comparing signal levels. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
585141bb30
commit
954e10e483
1 changed files with 12 additions and 1 deletions
|
@ -1346,6 +1346,7 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
|
|||
struct wpa_bss *current_bss = NULL;
|
||||
#ifndef CONFIG_NO_ROAMING
|
||||
int min_diff;
|
||||
int to_5ghz;
|
||||
#endif /* CONFIG_NO_ROAMING */
|
||||
|
||||
if (wpa_s->reassociate)
|
||||
|
@ -1401,7 +1402,10 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (current_bss->level < 0 && current_bss->level > selected->level) {
|
||||
to_5ghz = selected->freq > 4000 && current_bss->freq < 4000;
|
||||
|
||||
if (current_bss->level < 0 &&
|
||||
current_bss->level > selected->level + to_5ghz * 2) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "Skip roam - Current BSS has better "
|
||||
"signal level");
|
||||
return 0;
|
||||
|
@ -1420,6 +1424,13 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
|
|||
else
|
||||
min_diff = 5;
|
||||
}
|
||||
if (to_5ghz) {
|
||||
/* Make it easier to move to 5 GHz band */
|
||||
if (min_diff > 2)
|
||||
min_diff -= 2;
|
||||
else
|
||||
min_diff = 0;
|
||||
}
|
||||
if (abs(current_bss->level - selected->level) < min_diff) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "Skip roam - too small difference "
|
||||
"in signal level");
|
||||
|
|
Loading…
Reference in a new issue