aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-02-22 09:28:27 (GMT)
committerJouni Malinen <j@w1.fi>2015-02-22 09:45:45 (GMT)
commit0d2030ee20f22de311eb15521d11c4b179596f86 (patch)
treec749bef7444ed65468a8077660ddb5efd9e7d3ea /wpa_supplicant/events.c
parent1d747e2a98d5f5084d2b36c5a75cbe45fcf52d45 (diff)
downloadhostap-0d2030ee20f22de311eb15521d11c4b179596f86.zip
hostap-0d2030ee20f22de311eb15521d11c4b179596f86.tar.gz
hostap-0d2030ee20f22de311eb15521d11c4b179596f86.tar.bz2
Use estimated throughput to improve roaming selection
Previously, within-ESS roaming was skipped if the selected BSS did not have a higher signal strength than the current BSS regardless of AP capabilities. This could result in not moving to a BSS that would provide higher throughput, e.g., due to larger channel bandwidth or higher rates (HT/VHT MCS). Use estimated throughput information from scan result processing to allow within-ESS roaming if the selected BSS is likely to provide better throughput even if the current BSS has larger RSSI. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index d67365f..f76fe97 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1223,10 +1223,14 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
#ifndef CONFIG_NO_ROAMING
wpa_dbg(wpa_s, MSG_DEBUG, "Considering within-ESS reassociation");
- wpa_dbg(wpa_s, MSG_DEBUG, "Current BSS: " MACSTR " level=%d",
- MAC2STR(current_bss->bssid), current_bss->level);
- wpa_dbg(wpa_s, MSG_DEBUG, "Selected BSS: " MACSTR " level=%d",
- MAC2STR(selected->bssid), selected->level);
+ wpa_dbg(wpa_s, MSG_DEBUG, "Current BSS: " MACSTR
+ " level=%d snr=%d est_throughput=%u",
+ MAC2STR(current_bss->bssid), current_bss->level,
+ current_bss->snr, current_bss->est_throughput);
+ wpa_dbg(wpa_s, MSG_DEBUG, "Selected BSS: " MACSTR
+ " level=%d snr=%d est_throughput=%u",
+ MAC2STR(selected->bssid), selected->level,
+ selected->snr, selected->est_throughput);
if (wpa_s->current_ssid->bssid_set &&
os_memcmp(selected->bssid, wpa_s->current_ssid->bssid, ETH_ALEN) ==
@@ -1236,6 +1240,12 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
return 1;
}
+ if (selected->est_throughput > current_bss->est_throughput + 5000) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "Allow reassociation - selected BSS has better estimated throughput");
+ return 1;
+ }
+
if (current_bss->level < 0 && current_bss->level > selected->level) {
wpa_dbg(wpa_s, MSG_DEBUG, "Skip roam - Current BSS has better "
"signal level");