Access points at 36c3 use low transmit power on purpose, and often fall below the RSSI threshold which trigger background scans. At some locations (e.g. at the lake in CCL) I've seen iwm(4) ping-pong between APs repeatedly even while the laptop is stationary.
I am now running with the diff below which prevents roaming to a new AP with an RSSI level below the background scan threshold. In other words, if we can tell ahead of time that the new candiate AP will also trigger background scans then there is little point in switching to it. ok? diff 5181eb992cbbf64c135f177197957b0e0b427e21 /usr/src blob - 535c281bdd8e0d4eb22fd5476c8df2e24cb62be8 file + sys/net80211/ieee80211_node.c --- sys/net80211/ieee80211_node.c +++ sys/net80211/ieee80211_node.c @@ -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;