now that the new association callback is used when joining a bss we can

eliminate the ath_rate_newassoc callback and associated code
This commit is contained in:
Sam Leffler 2008-10-27 16:58:06 +00:00
parent e66b0905fc
commit 1eb911a5cc
5 changed files with 0 additions and 125 deletions
sys/dev/ath

@ -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.
*/

@ -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.
*/

@ -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)
{

@ -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.

@ -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.