diff options
author | jhb <jhb@FreeBSD.org> | 2009-12-02 16:26:18 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-12-02 16:26:18 +0000 |
commit | 2f0aea3d4ef3af824fdfcd7443c1d5a1bd3a1cbb (patch) | |
tree | 0a8bdcd05bcc4dac2b46bd593b3aa968acef64eb | |
parent | b6444e150f085e7777bc147f46f99cf36c91936e (diff) | |
download | FreeBSD-src-2f0aea3d4ef3af824fdfcd7443c1d5a1bd3a1cbb.zip FreeBSD-src-2f0aea3d4ef3af824fdfcd7443c1d5a1bd3a1cbb.tar.gz |
ndis_scan_results() can sleep if the scan results are not ready when
ndis_scan() is called. However, ndis_scan() is invoked from softclock()
and cannot sleep. Move ndis_scan_results() to the ndis' driver's scan_end
hook instead.
Submitted by: Paul B Mahol onemda of gmail
MFC after: 1 week
-rw-r--r-- | sys/dev/if_ndis/if_ndis.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 7651145..df2ee48 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -3222,14 +3222,8 @@ ndis_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) static void ndis_scan(void *arg) { - struct ndis_softc *sc = arg; - struct ieee80211com *ic; - struct ieee80211vap *vap; - - ic = sc->ifp->if_l2com; - vap = TAILQ_FIRST(&ic->ic_vaps); + struct ieee80211vap *vap = arg; - ndis_scan_results(sc); ieee80211_scan_done(vap); } @@ -3377,7 +3371,7 @@ ndis_scan_start(struct ieee80211com *ic) return; } /* Set a timer to collect the results */ - callout_reset(&sc->ndis_scan_callout, hz * 3, ndis_scan, sc); + callout_reset(&sc->ndis_scan_callout, hz * 3, ndis_scan, vap); } static void @@ -3401,5 +3395,7 @@ ndis_scan_mindwell(struct ieee80211_scan_state *ss) static void ndis_scan_end(struct ieee80211com *ic) { - /* ignore */ + struct ndis_softc *sc = ic->ic_ifp->if_softc; + + ndis_scan_results(sc); } |