diff options
Diffstat (limited to 'sys/dev/ic/bwfm.c')
-rw-r--r-- | sys/dev/ic/bwfm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c index e0444f592fa..6b8abba7eb1 100644 --- a/sys/dev/ic/bwfm.c +++ b/sys/dev/ic/bwfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwfm.c,v 1.60 2019/04/25 01:52:13 kevlo Exp $ */ +/* $OpenBSD: bwfm.c,v 1.61 2019/05/22 15:23:01 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se> @@ -2591,6 +2591,11 @@ bwfm_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) printf("%s: %s -> %s\n", DEVNAME(sc), ieee80211_state_name[ic->ic_state], ieee80211_state_name[nstate]); + /* No need to do this again. */ + if (ic->ic_state == IEEE80211_S_SCAN) { + splx(s); + return 0; + } ieee80211_set_link_state(ic, LINK_STATE_DOWN); ieee80211_free_allnodes(ic, 1); ic->ic_state = nstate; |