diff options
author | sam <sam@FreeBSD.org> | 2005-03-29 21:00:50 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-03-29 21:00:50 +0000 |
commit | 2f4dcc2b3d4d6c9d7a0a5a3ecd3be073cd024d1e (patch) | |
tree | 69c21777b88863c8f9b9ca585b3a5379d1aff161 /sys | |
parent | 6fe1686a77d67fbfbb296cad06c03cf80dc420c0 (diff) | |
download | FreeBSD-src-2f4dcc2b3d4d6c9d7a0a5a3ecd3be073cd024d1e.zip FreeBSD-src-2f4dcc2b3d4d6c9d7a0a5a3ecd3be073cd024d1e.tar.gz |
sync rates for any associated stations or neighbors on state transition
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ath/ath_rate/sample/sample.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/dev/ath/ath_rate/sample/sample.c b/sys/dev/ath/ath_rate/sample/sample.c index 3e8d25c..8a5d19c 100644 --- a/sys/dev/ath/ath_rate/sample/sample.c +++ b/sys/dev/ath/ath_rate/sample/sample.c @@ -725,6 +725,14 @@ ath_rate_ctl_reset(struct ath_softc *sc, struct ieee80211_node *ni) #undef RATE } +static void +rate_cb(void *arg, struct ieee80211_node *ni) +{ + struct ath_softc *sc = arg; + + ath_rate_newassoc(sc, ATH_NODE(ni), 1); +} + /* * Reset the rate control state for each 802.11 state transition. */ @@ -733,8 +741,15 @@ ath_rate_newstate(struct ath_softc *sc, enum ieee80211_state state) { struct ieee80211com *ic = &sc->sc_ic; - if (state == IEEE80211_S_RUN) + if (state == IEEE80211_S_RUN) { + if (ic->ic_opmode != IEEE80211_M_STA) { + /* + * Sync rates for associated stations and neighbors. + */ + ieee80211_iterate_nodes(&ic->ic_sta, rate_cb, sc); + } ath_rate_newassoc(sc, ATH_NODE(ic->ic_bss), 1); + } } static void |