From owner-svn-src-all@FreeBSD.ORG Sat Apr 16 07:21:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D82351065670; Sat, 16 Apr 2011 07:21:00 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C48AB8FC0C; Sat, 16 Apr 2011 07:21:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3G7L0WA095362; Sat, 16 Apr 2011 07:21:00 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3G7L05V095360; Sat, 16 Apr 2011 07:21:00 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201104160721.p3G7L05V095360@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 16 Apr 2011 07:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220688 - head/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2011 07:21:00 -0000 Author: bschmidt Date: Sat Apr 16 07:21:00 2011 New Revision: 220688 URL: http://svn.freebsd.org/changeset/base/220688 Log: Pass errors that might happen during state transitions up to net80211. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Apr 16 07:17:03 2011 (r220687) +++ head/sys/dev/iwn/if_iwn.c Sat Apr 16 07:21:00 2011 (r220688) @@ -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); }