diff --git a/sys/dev/ath/ath_rate/amrr/amrr.c b/sys/dev/ath/ath_rate/amrr/amrr.c index c230bdf2aad..530423d596e 100644 --- a/sys/dev/ath/ath_rate/amrr/amrr.c +++ b/sys/dev/ath/ath_rate/amrr/amrr.c @@ -321,49 +321,6 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) #undef RATE } -static void -ath_rate_cb(void *arg, struct ieee80211_node *ni) -{ - struct ath_softc *sc = arg; - - ath_rate_update(sc, ni, 0); -} - -/* - * Reset the rate control state for each 802.11 state transition. - */ -void -ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ath_softc *sc = ic->ic_ifp->if_softc; - struct ieee80211_node *ni; - - if (state == IEEE80211_S_INIT) - return; - if (vap->iv_opmode == IEEE80211_M_STA) { - /* - * Reset local xmit state; this is really only - * meaningful when operating in station mode. - */ - ni = vap->iv_bss; - if (state == IEEE80211_S_RUN) { - ath_rate_ctl_start(sc, ni); - } else { - ath_rate_update(sc, ni, 0); - } - } else { - /* - * When operating as a station the node table holds - * the AP's that were discovered during scanning. - * For any other operating mode we want to reset the - * tx rate state of each node. - */ - ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, sc); - ath_rate_update(sc, vap->iv_bss, 0); - } -} - /* * Examine and potentially adjust the transmit rate. */ diff --git a/sys/dev/ath/ath_rate/onoe/onoe.c b/sys/dev/ath/ath_rate/onoe/onoe.c index 25bac0926a5..8e465614fa8 100644 --- a/sys/dev/ath/ath_rate/onoe/onoe.c +++ b/sys/dev/ath/ath_rate/onoe/onoe.c @@ -295,49 +295,6 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) #undef RATE } -static void -ath_rate_cb(void *arg, struct ieee80211_node *ni) -{ - struct ath_softc *sc = arg; - - ath_rate_update(sc, ni, 0); -} - -/* - * Reset the rate control state for each 802.11 state transition. - */ -void -ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ath_softc *sc = ic->ic_ifp->if_softc; - struct ieee80211_node *ni; - - if (state == IEEE80211_S_INIT) - return; - if (vap->iv_opmode == IEEE80211_M_STA) { - /* - * Reset local xmit state; this is really only - * meaningful when operating in station mode. - */ - ni = vap->iv_bss; - if (state == IEEE80211_S_RUN) { - ath_rate_ctl_start(sc, ni); - } else { - ath_rate_update(sc, ni, 0); - } - } else { - /* - * When operating as a station the node table holds - * the AP's that were discovered during scanning. - * For any other operating mode we want to reset the - * tx rate state of each node. - */ - ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, sc); - ath_rate_update(sc, vap->iv_bss, 0); - } -} - /* * Examine and potentially adjust the transmit rate. */ diff --git a/sys/dev/ath/ath_rate/sample/sample.c b/sys/dev/ath/ath_rate/sample/sample.c index 60a81ed3799..56a3deffce6 100644 --- a/sys/dev/ath/ath_rate/sample/sample.c +++ b/sys/dev/ath/ath_rate/sample/sample.c @@ -758,34 +758,6 @@ 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. - */ -void -ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ath_softc *sc = ic->ic_ifp->if_softc; - - if (state == IEEE80211_S_RUN) { - if (vap->iv_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(vap->iv_bss), 1); - } -} - static void ath_rate_sysctlattach(struct ath_softc *sc, struct sample_softc *osc) { diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index b4a8dd880b4..3281390a637 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -5664,11 +5664,6 @@ ath_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) if (ath_hal_keyisvalid(ah, i)) ath_hal_keysetmac(ah, i, ni->ni_bssid); } - /* - * Notify the rate control algorithm so rates - * are setup should ath_beacon_alloc be called. - */ - ath_rate_newstate(vap, nstate); /* * Invoke the parent method to do net80211 work. diff --git a/sys/dev/ath/if_athrate.h b/sys/dev/ath/if_athrate.h index 3ad287af5aa..189db10d851 100644 --- a/sys/dev/ath/if_athrate.h +++ b/sys/dev/ath/if_athrate.h @@ -97,12 +97,6 @@ void ath_rate_node_cleanup(struct ath_softc *, struct ath_node *); */ void ath_rate_newassoc(struct ath_softc *, struct ath_node *, int isNewAssociation); -/* - * Update/reset rate control state for 802.11 state transitions. - * Important mostly as the analog to ath_rate_newassoc when operating - * in station mode. - */ -void ath_rate_newstate(struct ieee80211vap *, enum ieee80211_state); /* * Transmit handling.