diff options
author | 2019-12-29 14:00:36 +0000 | |
---|---|---|
committer | 2019-12-29 14:00:36 +0000 | |
commit | 05e5c69149cd9b1ca6422ddf55a7e2d8ef13bdf2 (patch) | |
tree | eed1189965f67615d168be740102dc6235e00af2 | |
parent | increase net80211's node cache size; now we can see all APs at 36c3 (diff) | |
download | wireguard-openbsd-05e5c69149cd9b1ca6422ddf55a7e2d8ef13bdf2.tar.xz wireguard-openbsd-05e5c69149cd9b1ca6422ddf55a7e2d8ef13bdf2.zip |
If the new candidate AP found after a background scan has an RSSI level
that will also trigger background scans, remain with the current AP.
Avoids ping-pong in environments where APs are tuned for low transmit
range, such as 36c3.
ok phessler benno
-rw-r--r-- | sys/net80211/ieee80211_node.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 535c281bdd8..9814e35ad66 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.177 2019/11/10 09:09:02 stsp Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.178 2019/12/29 14:00:36 stsp Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -1429,10 +1429,12 @@ ieee80211_end_scan(struct ifnet *ifp) /* * After a background scan we might end up choosing the - * same AP again. Do not change ic->ic_bss in this case, - * and make background scans less frequent. + * same AP again. Or the newly selected AP's RSSI level + * might be low enough to trigger another background scan. + * Do not change ic->ic_bss in these cases and make + * background scans less frequent. */ - if (selbs == curbs) { + if (selbs == curbs || !(*ic->ic_node_checkrssi)(ic, selbs)) { if (ic->ic_bgscan_fail < IEEE80211_BGSCAN_FAIL_MAX) { if (ic->ic_bgscan_fail <= 0) ic->ic_bgscan_fail = 1; |