summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-05-10 02:44:19 +0000
committerthompsa <thompsa@FreeBSD.org>2009-05-10 02:44:19 +0000
commitff540a7f599a544251236e9926ca2f2cf4c11de0 (patch)
treee61a7862b55b33760a6aafa9c188f6e7c22f248f /sys/dev
parentaae9005ac300568382cff11869223c881b3d0241 (diff)
downloadFreeBSD-src-ff540a7f599a544251236e9926ca2f2cf4c11de0.zip
FreeBSD-src-ff540a7f599a544251236e9926ca2f2cf4c11de0.tar.gz
Abort any scan on a fatal firmware. ic_scan_curchan is overridden to perform
the scan in firmware and this relies on the firmware to wake up the scan task on completion.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ipw/if_ipw.c3
-rw-r--r--sys/dev/iwi/if_iwi.c3
-rw-r--r--sys/dev/iwn/if_iwn.c3
-rw-r--r--sys/dev/wpi/if_wpi.c3
4 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c
index eac9091..c69ab6d 100644
--- a/sys/dev/ipw/if_ipw.c
+++ b/sys/dev/ipw/if_ipw.c
@@ -1384,8 +1384,11 @@ ipw_fatal_error_intr(struct ipw_softc *sc)
{
struct ifnet *ifp = sc->sc_ifp;
struct ieee80211com *ic = ifp->if_l2com;
+ struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
device_printf(sc->sc_dev, "firmware error\n");
+ if (vap != NULL)
+ ieee80211_cancel_scan(vap);
ieee80211_runtask(ic, &sc->sc_init_task);
}
diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c
index 6513522..f7d891e 100644
--- a/sys/dev/iwi/if_iwi.c
+++ b/sys/dev/iwi/if_iwi.c
@@ -1635,8 +1635,11 @@ iwi_fatal_error_intr(struct iwi_softc *sc)
{
struct ifnet *ifp = sc->sc_ifp;
struct ieee80211com *ic = ifp->if_l2com;
+ struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
device_printf(sc->sc_dev, "firmware error\n");
+ if (vap != NULL)
+ ieee80211_cancel_scan(vap);
ieee80211_runtask(ic, &sc->sc_restarttask);
sc->flags &= ~IWI_FLAG_BUSY;
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index f32bdaa..9913d90 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -1789,11 +1789,14 @@ iwn_error_intr(struct iwn_softc *sc, uint32_t r1, uint32_t r2)
{
struct ifnet *ifp = sc->sc_ifp;
struct ieee80211com *ic = ifp->if_l2com;
+ struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
IWN_LOCK_ASSERT(sc);
device_printf(sc->sc_dev, "error, INTR=%b STATUS=0x%x\n",
r1, IWN_INTR_BITS, r2);
+ if (vap != NULL)
+ ieee80211_cancel_scan(vap);
ieee80211_runtask(ic, &sc->sc_reinit_task);
}
diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c
index 0ab8680..9537dd4 100644
--- a/sys/dev/wpi/if_wpi.c
+++ b/sys/dev/wpi/if_wpi.c
@@ -1786,10 +1786,13 @@ wpi_intr(void *arg)
if (r & (WPI_SW_ERROR | WPI_HW_ERROR)) {
struct ifnet *ifp = sc->sc_ifp;
struct ieee80211com *ic = ifp->if_l2com;
+ struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
device_printf(sc->sc_dev, "fatal firmware error\n");
DPRINTFN(6,("(%s)\n", (r & WPI_SW_ERROR) ? "(Software Error)" :
"(Hardware Error)"));
+ if (vap != NULL)
+ ieee80211_cancel_scan(vap);
ieee80211_runtask(ic, &sc->sc_restarttask);
sc->flags &= ~WPI_FLAG_BUSY;
WPI_UNLOCK(sc);
OpenPOWER on IntegriCloud