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.
This commit is contained in:
thompsa 2009-05-10 02:44:19 +00:00
parent aae9005ac3
commit ff540a7f59
4 changed files with 12 additions and 0 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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);