From: patrick Date: Thu, 19 Aug 2021 14:13:39 +0000 (+0000) Subject: Purge the cached nodes when we switch back to SCAN. In case we lost X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=732f0a59e14972003a7f317ae03142cc557bb383;p=openbsd Purge the cached nodes when we switch back to SCAN. In case we lost the connection because an AP is gone away, this makes sure we don't end up picking a now non-existant AP over and over. Another problem this works around is that when trying to re-join that AP, the attempt to connect would not yield any event message from the firmware, and then we would get stuck. Since we now definitely choose a different AP, this issue does not show up. ok stsp@ --- diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c index cb10a128eee..0c52220bd08 100644 --- a/sys/dev/ic/bwfm.c +++ b/sys/dev/ic/bwfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwfm.c,v 1.87 2021/08/19 13:58:40 patrick Exp $ */ +/* $OpenBSD: bwfm.c,v 1.88 2021/08/19 14:13:39 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt @@ -2785,7 +2785,7 @@ bwfm_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) return 0; } ieee80211_set_link_state(ic, LINK_STATE_DOWN); - ieee80211_node_cleanup(ic, ic->ic_bss); + ieee80211_free_allnodes(ic, 1); ic->ic_state = nstate; splx(s); return 0;