diff options
author | sam <sam@FreeBSD.org> | 2009-08-31 21:25:49 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-08-31 21:25:49 +0000 |
commit | f193f1ad30e91ead346558aaaa5bce2169e5cd67 (patch) | |
tree | 2de1d53bb0640236b58538fd05afdf2a96a741dd /sys/dev/ath/if_ath.c | |
parent | 58b42709a0e29c96f12b161a0ff442fb06be9400 (diff) | |
download | FreeBSD-src-f193f1ad30e91ead346558aaaa5bce2169e5cd67.zip FreeBSD-src-f193f1ad30e91ead346558aaaa5bce2169e5cd67.tar.gz |
On resume in sta mode program the beacon timers so when roaming (and
the previous ap is no longer in range) the device will deliver bmiss
interrupts and trigger the state machine. Also arrange to sync the
beacon timers on the next received beacon frame so that when we don't
roam we re-synchronize with the ap.
Tested by: trasz
MFC after: 1 week
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r-- | sys/dev/ath/if_ath.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index a789f5e..5628add 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -1236,7 +1236,16 @@ ath_resume(struct ath_softc *sc) if (sc->sc_resume_up) { if (ic->ic_opmode == IEEE80211_M_STA) { ath_init(sc); - ieee80211_beacon_miss(ic); + /* + * Program the beacon registers using the last rx'd + * beacon frame and enable sync on the next beacon + * we see. This should handle the case where we + * wakeup and find the same AP and also the case where + * we wakeup and need to roam. For the latter we + * should get bmiss events that trigger a roam. + */ + ath_beacon_config(sc, NULL); + sc->sc_syncbeacon = 1; } else ieee80211_resume_all(ic); } |