diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2005-03-29 21:00:50 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2005-03-29 21:00:50 +0000 |
| commit | f0fd5e07bbc1f133f29c257c031378f9dae42697 (patch) | |
| tree | 69c21777b88863c8f9b9ca585b3a5379d1aff161 /sys/dev/ath | |
| parent | b467935a0608bb7491a993463725b74fbe53e939 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ath')
| -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 3e8d25c486f48..8a5d19c6fd87c 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 |
