Date: Wed, 17 Nov 2004 19:26:03 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 65354 for review Message-ID: <200411171926.iAHJQ3u1088026@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=65354 Change 65354 by sam@sam_ebb on 2004/11/17 19:25:23 o fixup for node table rewrite o use ieee80211_iterate_nodes instead of hand-rolled code to scan the station table Affected files ... .. //depot/projects/wifi/sys/dev/ath/ath_rate/amrr/amrr.c#2 edit .. //depot/projects/wifi/sys/dev/ath/ath_rate/onoe/onoe.c#2 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/ath_rate/amrr/amrr.c#2 (text+ko) ==== @@ -330,6 +330,12 @@ #undef RATE } +static void +ath_rate_cb(void *arg, struct ieee80211_node *ni) +{ + ath_rate_update(ni->ni_ic->ic_ifp->if_softc, ni, (int) arg); +} + /* * Reset the rate control state for each 802.11 state transition. */ @@ -362,8 +368,8 @@ * For any other operating mode we want to reset the * tx rate state of each node. */ - TAILQ_FOREACH(ni, &ic->ic_node, ni_list) - ath_rate_update(sc, ni, 0); /* use lowest rate */ + if (ic->ic_sta != NULL) + ieee80211_iterate_nodes(ic->ic_sta, ath_rate_cb, 0); ath_rate_update(sc, ic->ic_bss, 0); } if (ic->ic_fixed_rate == -1 && state == IEEE80211_S_RUN) { @@ -468,7 +474,7 @@ if (ic->ic_opmode == IEEE80211_M_STA) ath_rate_ctl(sc, ic->ic_bss); /* NB: no reference */ - else + else if (ic->ic_sta != NULL) ieee80211_iterate_nodes(ic, ath_rate_ctl, sc); } interval = ath_rateinterval; ==== //depot/projects/wifi/sys/dev/ath/ath_rate/onoe/onoe.c#2 (text+ko) ==== @@ -319,6 +319,12 @@ #undef RATE } +static void +ath_rate_cb(void *arg, struct ieee80211_node *ni) +{ + ath_rate_update(ni->ni_ic->ic_ifp->if_softc, ni, (int) arg); +} + /* * Reset the rate control state for each 802.11 state transition. */ @@ -351,8 +357,8 @@ * For any other operating mode we want to reset the * tx rate state of each node. */ - TAILQ_FOREACH(ni, &ic->ic_node, ni_list) - ath_rate_update(sc, ni, 0); /* use lowest rate */ + if (ic->ic_sta != NULL) + ieee80211_iterate_nodes(ic->ic_sta, ath_rate_cb, 0); ath_rate_update(sc, ic->ic_bss, 0); } if (ic->ic_fixed_rate == -1 && state == IEEE80211_S_RUN) { @@ -454,8 +460,8 @@ if (ic->ic_opmode == IEEE80211_M_STA) ath_rate_ctl(sc, ic->ic_bss); /* NB: no reference */ - else - ieee80211_iterate_nodes(ic, ath_rate_ctl, sc); + else if (ic->ic_sta != NULL) + ieee80211_iterate_nodes(ic->ic_sta, ath_rate_ctl, sc); } interval = ath_rateinterval; if (ic->ic_opmode == IEEE80211_M_STA)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411171926.iAHJQ3u1088026>