diff options
author | sam <sam@FreeBSD.org> | 2005-03-29 20:59:49 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-03-29 20:59:49 +0000 |
commit | 6fe1686a77d67fbfbb296cad06c03cf80dc420c0 (patch) | |
tree | c92328bbe8f6f3cd6da937667ed4f38208278e1e /sys/dev | |
parent | a946e6decee6b0cf3f5a22e76ea9b03df221be20 (diff) | |
download | FreeBSD-src-6fe1686a77d67fbfbb296cad06c03cf80dc420c0.zip FreeBSD-src-6fe1686a77d67fbfbb296cad06c03cf80dc420c0.tar.gz |
simplify callback
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ath/ath_rate/amrr/amrr.c | 6 | ||||
-rw-r--r-- | sys/dev/ath/ath_rate/onoe/onoe.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/ath/ath_rate/amrr/amrr.c b/sys/dev/ath/ath_rate/amrr/amrr.c index 7a2af6f..ae61d44 100644 --- a/sys/dev/ath/ath_rate/amrr/amrr.c +++ b/sys/dev/ath/ath_rate/amrr/amrr.c @@ -326,7 +326,9 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) static void ath_rate_cb(void *arg, struct ieee80211_node *ni) { - ath_rate_update(ni->ni_ic->ic_ifp->if_softc, ni, (int)(uintptr_t) arg); + struct ath_softc *sc = arg; + + ath_rate_update(sc, ni, 0); } /* @@ -361,7 +363,7 @@ ath_rate_newstate(struct ath_softc *sc, enum ieee80211_state state) * 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, 0); + ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, sc); ath_rate_update(sc, ic->ic_bss, 0); } if (ic->ic_fixed_rate == -1 && state == IEEE80211_S_RUN) { diff --git a/sys/dev/ath/ath_rate/onoe/onoe.c b/sys/dev/ath/ath_rate/onoe/onoe.c index cb26c5b..3bc90b3 100644 --- a/sys/dev/ath/ath_rate/onoe/onoe.c +++ b/sys/dev/ath/ath_rate/onoe/onoe.c @@ -310,7 +310,9 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) static void ath_rate_cb(void *arg, struct ieee80211_node *ni) { - ath_rate_update(ni->ni_ic->ic_ifp->if_softc, ni, (int)(uintptr_t) arg); + struct ath_softc *sc = arg; + + ath_rate_update(sc, ni, 0); } /* @@ -345,7 +347,7 @@ ath_rate_newstate(struct ath_softc *sc, enum ieee80211_state state) * 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, 0); + ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, sc); ath_rate_update(sc, ic->ic_bss, 0); } if (ic->ic_fixed_rate == -1 && state == IEEE80211_S_RUN) { |