Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 May 2009 02:44:19 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191956 - in head/sys/dev: ipw iwi iwn wpi
Message-ID:  <200905100244.n4A2iJXh040974@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thompsa
Date: Sun May 10 02:44:19 2009
New Revision: 191956
URL: http://svn.freebsd.org/changeset/base/191956

Log:
  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.

Modified:
  head/sys/dev/ipw/if_ipw.c
  head/sys/dev/iwi/if_iwi.c
  head/sys/dev/iwn/if_iwn.c
  head/sys/dev/wpi/if_wpi.c

Modified: head/sys/dev/ipw/if_ipw.c
==============================================================================
--- head/sys/dev/ipw/if_ipw.c	Sun May 10 02:21:19 2009	(r191955)
+++ head/sys/dev/ipw/if_ipw.c	Sun May 10 02:44:19 2009	(r191956)
@@ -1384,8 +1384,11 @@ ipw_fatal_error_intr(struct ipw_softc *s
 {
 	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);
 }
 

Modified: head/sys/dev/iwi/if_iwi.c
==============================================================================
--- head/sys/dev/iwi/if_iwi.c	Sun May 10 02:21:19 2009	(r191955)
+++ head/sys/dev/iwi/if_iwi.c	Sun May 10 02:44:19 2009	(r191956)
@@ -1635,8 +1635,11 @@ iwi_fatal_error_intr(struct iwi_softc *s
 {
 	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;

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c	Sun May 10 02:21:19 2009	(r191955)
+++ head/sys/dev/iwn/if_iwn.c	Sun May 10 02:44:19 2009	(r191956)
@@ -1789,11 +1789,14 @@ iwn_error_intr(struct iwn_softc *sc, uin
 {
 	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);
 }
 

Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c	Sun May 10 02:21:19 2009	(r191955)
+++ head/sys/dev/wpi/if_wpi.c	Sun May 10 02:44:19 2009	(r191956)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905100244.n4A2iJXh040974>