summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbschmidt <bschmidt@FreeBSD.org>2011-04-16 07:21:00 +0000
committerbschmidt <bschmidt@FreeBSD.org>2011-04-16 07:21:00 +0000
commitfaacd12d6989a158cfa1b9d1a35e359bbfdea8a9 (patch)
tree591bce8d8930d52eb8cba25757fbb23af934bb56 /sys
parent20625a61f28ec8ef23e483d7b8e65d2030d9249a (diff)
downloadFreeBSD-src-faacd12d6989a158cfa1b9d1a35e359bbfdea8a9.zip
FreeBSD-src-faacd12d6989a158cfa1b9d1a35e359bbfdea8a9.tar.gz
Pass errors that might happen during state transitions up to net80211.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/iwn/if_iwn.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index dc12fbf..e6e899a 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -1920,7 +1920,7 @@ iwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
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, enum ieee80211_state nstate, int arg)
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, enum ieee80211_state nstate, int arg)
* 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, enum ieee80211_state nstate, int arg)
}
IWN_UNLOCK(sc);
IEEE80211_LOCK(ic);
+ if (error != 0)
+ return error;
return ivp->iv_newstate(vap, nstate, arg);
}
OpenPOWER on IntegriCloud