Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/pci Tweak scanning for iwn.
details: https://anonhg.NetBSD.org/src-all/rev/09a7fb06f8ab
branches: trunk
changeset: 363065:09a7fb06f8ab
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Mon May 18 22:46:41 2020 +1000
description:
Tweak scanning for iwn.
diffstat:
sys/dev/pci/if_iwn.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diffs (48 lines):
diff -r f23d42b7d20f -r 09a7fb06f8ab sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Mon May 18 20:31:02 2020 +1000
+++ b/sys/dev/pci/if_iwn.c Mon May 18 22:46:41 2020 +1000
@@ -841,6 +841,9 @@
iwn_scan_start(struct ieee80211com *ic)
{
struct iwn_softc *sc = ic->ic_softc;
+ IEEE80211_LOCK(ic);
+ ic->ic_flags |= IEEE80211_F_SCAN;
+ IEEE80211_UNLOCK(ic);
/* make the link LED blink while we're scanning */
iwn_set_led(sc, IWN_LED_LINK, 20, 2);
@@ -855,6 +858,10 @@
struct iwn_softc *sc = ic->ic_softc;
struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
+ IEEE80211_LOCK(ic);
+ ic->ic_flags &= ~IEEE80211_F_SCAN;
+ IEEE80211_UNLOCK(ic);
+
if (vap->iv_state == IEEE80211_S_RUN) {
/* Set link LED to ON status if we are associated */
iwn_set_led(sc, IWN_LED_LINK, 0, 1);
@@ -2942,11 +2949,6 @@
DPRINTFN(2, ("scanning channel %d status %x\n",
scan->chan, le32toh(scan->status)));
-#if 0
- IEEE80211_LOCK(ic);
- ic->ic_flags |= IEEE80211_F_SCAN;
- IEEE80211_UNLOCK(ic);
-#endif
/* Fix current channel. */
vap->iv_bss->ni_chan = &ic->ic_channels[scan->chan];
break;
@@ -2962,11 +2964,6 @@
scan->nchan, scan->status, scan->chan));
sc->sc_flags &= ~IWN_FLAG_SCANNING;
-#if 0
- IEEE80211_LOCK(ic);
- ic->ic_flags &= ~IEEE80211_F_SCAN;
- IEEE80211_UNLOCK(ic);
-#endif
ieee80211_scan_next(vap);
break;
}
Home |
Main Index |
Thread Index |
Old Index