diff options
| author | roy <roy@NetBSD.org> | 2013-11-26 09:46:24 +0000 |
|---|---|---|
| committer | roy <roy@NetBSD.org> | 2013-11-26 09:46:24 +0000 |
| commit | 2f8446eb045349c5e2edf2c6ead1c8bf0cee493e (patch) | |
| tree | 2cd2c0ab3795b4896f1e9869cf71f3ed7ecd5f61 /sys/dev | |
| parent | 4c7140fbc963e6220bb6cf22a32bb067c34c8ed4 (diff) | |
iwi_newstate should work along with ieee80211_new_state, not always
override it.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/if_iwi.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c index 5f02ba923fc..e583487e417 100644 --- a/sys/dev/pci/if_iwi.c +++ b/sys/dev/pci/if_iwi.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwi.c,v 1.94 2013/11/21 21:14:05 riz Exp $ */ +/* $NetBSD: if_iwi.c,v 1.95 2013/11/26 09:46:24 roy Exp $ */ /* $OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $ */ /*- @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.94 2013/11/21 21:14:05 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.95 2013/11/26 09:46:24 roy Exp $"); /*- * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver @@ -930,25 +930,25 @@ iwi_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) break; case IEEE80211_S_RUN: - if (ic->ic_opmode == IEEE80211_M_IBSS) - ieee80211_new_state(ic, IEEE80211_S_AUTH, -1); + if (ic->ic_opmode == IEEE80211_M_IBSS && + ic->ic_state == IEEE80211_S_SCAN) + iwi_auth_and_assoc(sc); else if (ic->ic_opmode == IEEE80211_M_MONITOR) iwi_set_chan(sc, ic->ic_ibss_chan); - - return (*sc->sc_newstate)(ic, nstate, - IEEE80211_FC0_SUBTYPE_ASSOC_RESP); - + break; case IEEE80211_S_ASSOC: iwi_led_set(sc, IWI_LED_ASSOCIATED, 0); + if (ic->ic_state == IEEE80211_S_AUTH) + break; + iwi_auth_and_assoc(sc); break; case IEEE80211_S_INIT: sc->flags &= ~IWI_FLAG_SCANNING; - return (*sc->sc_newstate)(ic, nstate, arg); + break; } - ic->ic_state = nstate; - return 0; + return sc->sc_newstate(ic, nstate, arg); } /* |
