diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index 9540dd6..0cbccee 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -1369,12 +1369,9 @@ wpi_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) /* FALLTHROUGH */ case IEEE80211_S_AUTH: - sc->flags |= WPI_FLAG_AUTH; sc->config.associd = 0; sc->config.filter &= ~htole32(WPI_FILTER_BSS); - wpi_queue_cmd(sc,WPI_AUTH); - DPRINTF(("END AUTH\n")); - break; + return wpi_queue_cmd(sc,WPI_AUTH); case IEEE80211_S_RUN: if (ic->ic_opmode == IEEE80211_M_MONITOR) { @@ -2643,8 +2640,6 @@ wpi_auth(struct wpi_softc *sc) return error; } - sc->flags &= ~WPI_FLAG_AUTH; - return 0; } @@ -3771,10 +3766,6 @@ again: break; case WPI_SET_CHAN: - if (sc->flags&WPI_FLAG_AUTH) { - DPRINTF(("Authenticating, not changing channel\n")); - break; - } if (wpi_config(sc)) { DPRINTF(("Scan cancelled\n")); WPI_UNLOCK(sc); @@ -3796,8 +3787,7 @@ again: return; } WPI_UNLOCK(sc); - ieee80211_node_authorize(ic->ic_bss); - ieee80211_new_state(ic, IEEE80211_S_ASSOC, -1); + sc->sc_newstate(ic, IEEE80211_S_AUTH, arg); WPI_LOCK(sc); break; }