diff options
| author | Bernhard Schmidt <bschmidt@FreeBSD.org> | 2010-12-13 17:53:41 +0000 |
|---|---|---|
| committer | Bernhard Schmidt <bschmidt@FreeBSD.org> | 2010-12-13 17:53:41 +0000 |
| commit | 262a2423dc28ea2617b75521afa29187fe59edaa (patch) | |
| tree | 5bbf6e7a35ae923bb69c771c9f89d4ab1ce32f35 /sys/dev | |
| parent | 2c67f7bfcad360deaad1831d22a160b997aff0af (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/wpi/if_wpi.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index f6edc916569c..72d59109fec5 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -1248,8 +1248,25 @@ wpi_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) IEEE80211_UNLOCK(ic); WPI_LOCK(sc); - if (nstate == IEEE80211_S_AUTH) { - /* The node must be registered in the firmware before auth */ + if (nstate == IEEE80211_S_SCAN && vap->iv_state != IEEE80211_S_INIT) { + /* + * On !INIT -> SCAN transitions, we need to clear any possible + * knowledge about associations. + */ + error = wpi_config(sc); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: device config failed, error %d\n", + __func__, error); + } + } + if (nstate == IEEE80211_S_AUTH || + (nstate == IEEE80211_S_ASSOC && vap->iv_state == IEEE80211_S_RUN)) { + /* + * The node must be registered in the firmware before auth. + * Also the associd must be cleared on RUN -> ASSOC + * transitions. + */ error = wpi_auth(sc, vap); if (error != 0) { device_printf(sc->sc_dev, |
