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/a2cdc98d6ccf
branches:  trunk
changeset: 946905:a2cdc98d6ccf
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 52e5c0a74f54 -r a2cdc98d6ccf 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
@@ -768,6 +768,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);
@@ -782,6 +785,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);
@@ -2869,11 +2876,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;
@@ -2889,11 +2891,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