summaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2019-12-29 14:00:37 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2019-12-29 14:00:37 +0000
commitc90c93229d760707df8036942f83efcaccdb3b90 (patch)
tree7da2483a96669bf061c85388a863e1fc73f6ad1b /sys/net80211
parent6bf72e0177481a21699ab28c540f4378c5f96e00 (diff)
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
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_node.c10
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;