Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jun 2011 11:43:06 +0000 (UTC)
From:      Bernhard Schmidt <bschmidt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r223242 - stable/8/sys/dev/iwn
Message-ID:  <201106181143.p5IBh6VY039081@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bschmidt
Date: Sat Jun 18 11:43:06 2011
New Revision: 223242
URL: http://svn.freebsd.org/changeset/base/223242

Log:
  MFC r220688:
  Pass errors that might happen during state transitions up to net80211.

Modified:
  stable/8/sys/dev/iwn/if_iwn.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/iwn/if_iwn.c
==============================================================================
--- stable/8/sys/dev/iwn/if_iwn.c	Sat Jun 18 11:41:06 2011	(r223241)
+++ stable/8/sys/dev/iwn/if_iwn.c	Sat Jun 18 11:43:06 2011	(r223242)
@@ -1920,7 +1920,7 @@ iwn_newstate(struct ieee80211vap *vap, e
 	struct iwn_vap *ivp = IWN_VAP(vap);
 	struct ieee80211com *ic = vap->iv_ic;
 	struct iwn_softc *sc = ic->ic_ifp->if_softc;
-	int error;
+	int error = 0;
 
 	DPRINTF(sc, IWN_DEBUG_STATE, "%s: %s -> %s\n", __func__,
 		ieee80211_state_name[vap->iv_state],
@@ -1947,7 +1947,10 @@ iwn_newstate(struct ieee80211vap *vap, e
 		sc->rxon.filter &= ~htole32(IWN_FILTER_BSS);
 		sc->calib.state = IWN_CALIB_STATE_INIT;
 
-		error = iwn_auth(sc, vap);
+		if ((error = iwn_auth(sc, vap)) != 0) {
+			device_printf(sc->sc_dev,
+			    "%s: could not move to auth state\n", __func__);
+		}
 		break;
 
 	case IEEE80211_S_RUN:
@@ -1964,7 +1967,10 @@ iwn_newstate(struct ieee80211vap *vap, e
 		 * which is done with a firmware cmd.  We also defer
 		 * starting the timers until that work is done.
 		 */
-		error = iwn_run(sc, vap);
+		if ((error = iwn_run(sc, vap)) != 0) {
+			device_printf(sc->sc_dev,
+			    "%s: could not move to run state\n", __func__);
+		}
 		break;
 
 	case IEEE80211_S_INIT:
@@ -1976,6 +1982,8 @@ iwn_newstate(struct ieee80211vap *vap, e
 	}
 	IWN_UNLOCK(sc);
 	IEEE80211_LOCK(ic);
+	if (error != 0)
+		return error;
 	return ivp->iv_newstate(vap, nstate, arg);
 }
 



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