diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2018-04-28 16:05:57 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2018-04-28 16:05:57 +0000 |
commit | c1f63c345461e172247990bd02d224460b85a382 (patch) | |
tree | 426803cfe96680445e19eaabd818ab3bd437bed3 /sys/dev/pci/if_iwm.c | |
parent | ce3d6b0eda89394776fc9bbc4cfabd6aaf385e62 (diff) |
Some drivers handle settting a new wifi link state manually, so make sure
they flush old nodes and set the interface link state to down, like the
framework does.
OK stsp@ pirofti@
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 150cb4dcef6..0d56e5d498d 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.227 2018/04/26 12:50:07 pirofti Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.228 2018/04/28 16:05:56 phessler Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -5501,6 +5501,10 @@ iwm_scan(struct iwm_softc *sc) printf("%s: %s -> %s\n", ifp->if_xname, ieee80211_state_name[ic->ic_state], ieee80211_state_name[IEEE80211_S_SCAN]); + if ((sc->sc_flags & IWM_FLAG_BGSCAN) == 0) { + ieee80211_set_link_state(ic, LINK_STATE_DOWN); + ieee80211_free_allnodes(ic, 1); + } ic->ic_state = IEEE80211_S_SCAN; iwm_led_blink_start(sc); wakeup(&ic->ic_state); /* wake iwm_init() */ |