diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2021-08-19 13:58:41 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2021-08-19 13:58:41 +0000 |
commit | 6f8710c523a516ac3d1f127fdebb2c78b663e54c (patch) | |
tree | 7bbad259c2e9730af4de2b42a3fa27321c7189f4 /sys/dev/ic | |
parent | b9752e03054def2202e4cbfb3f4d7de1c0b870b8 (diff) |
Consistently use ieee80211_begin_scan() to switch to SCAN.
React to deauth/disassoc and link state events if we're
already past the SCAN stage.
ok stsp@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/bwfm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c index a292bc84218..cb10a128eee 100644 --- a/sys/dev/ic/bwfm.c +++ b/sys/dev/ic/bwfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwfm.c,v 1.86 2021/08/19 06:02:39 stsp Exp $ */ +/* $OpenBSD: bwfm.c,v 1.87 2021/08/19 13:58:40 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se> @@ -2469,16 +2469,16 @@ bwfm_rx_event_cb(struct bwfm_softc *sc, struct mbuf *m) break; case BWFM_E_DEAUTH: case BWFM_E_DISASSOC: - if (ic->ic_state != IEEE80211_S_INIT) - ieee80211_new_state(ic, IEEE80211_S_SCAN, -1); + if (ic->ic_state > IEEE80211_S_SCAN) + ieee80211_begin_scan(ifp); break; case BWFM_E_LINK: if (ntohl(e->msg.status) == BWFM_E_STATUS_SUCCESS && ntohl(e->msg.reason) == 0) break; /* Link status has changed */ - if (ic->ic_state != IEEE80211_S_INIT) - ieee80211_new_state(ic, IEEE80211_S_SCAN, -1); + if (ic->ic_state > IEEE80211_S_SCAN) + ieee80211_begin_scan(ifp); break; #ifndef IEEE80211_STA_ONLY case BWFM_E_AUTH_IND: |