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 Scanning fixes for iwm(4).
details: https://anonhg.NetBSD.org/src-all/rev/684a6defeef6
branches: trunk
changeset: 377164:684a6defeef6
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Thu Jun 29 01:02:59 2023 +1000
description:
Scanning fixes for iwm(4).
Scanning works now ch. 1 at least.
Rework of iwm_scan_end as its handled in a notify interrupt by the device.
diffstat:
sys/dev/pci/if_iwm.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r 0762eeb7f168 -r 684a6defeef6 sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c Tue Jun 27 22:42:06 2023 +1000
+++ b/sys/dev/pci/if_iwm.c Thu Jun 29 01:02:59 2023 +1000
@@ -6464,14 +6464,13 @@ iwm_newstate(struct ieee80211vap *vap, e
static void
iwm_endscan(struct iwm_softc *sc)
{
-#if 0
struct ieee80211com *ic = &sc->sc_ic;
+ struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
DPRINTF(("%s: scan ended\n", DEVNAME(sc)));
- if (ic->ic_state == IEEE80211_S_SCAN)
- ieee80211_end_scan(ic);
-#endif
+ if (vap->iv_state == IEEE80211_S_SCAN)
+ ieee80211_scan_done(vap);
}
/*
@@ -8421,14 +8420,19 @@ iwm_scan_start(struct ieee80211com *ic)
static void
iwm_scan_end(struct ieee80211com *ic)
{
- struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
+ struct iwm_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);
+ while (ISSET(sc->sc_flags, IWM_FLAG_SCANNING))
+ kpause("iwmscan", true, 1, NULL);
+#if 0
ieee80211_scan_done(vap);
ieee80211_cancel_scan(vap, 0);
+#endif
}
/*
Home |
Main Index |
Thread Index |
Old Index