aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-03-25 09:53:59 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-25 10:12:48 (GMT)
commit954e10e483a0b98c1dc3a8ad1f5c2d3a9ef5b781 (patch)
treeaa586a28c6f71da64af638de462d451399780b35
parent585141bb30a0912841afe1e2682aa7bad5fc43bd (diff)
downloadhostap-954e10e483a0b98c1dc3a8ad1f5c2d3a9ef5b781.zip
hostap-954e10e483a0b98c1dc3a8ad1f5c2d3a9ef5b781.tar.gz
hostap-954e10e483a0b98c1dc3a8ad1f5c2d3a9ef5b781.tar.bz2
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>
-rw-r--r--wpa_supplicant/events.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 1483ad4..3c3f626 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -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");