diff options
author | sam <sam@FreeBSD.org> | 2005-01-24 19:32:10 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-01-24 19:32:10 +0000 |
commit | 459bcc3dba08670eaf93dc7b8024a4b60531c5fc (patch) | |
tree | f5f89d2432bd0c441a8317125fb32932cc73df3d /sys/dev/ath | |
parent | 945d03f4178b75dc99b58838b671f60dc40fe1dc (diff) | |
download | FreeBSD-src-459bcc3dba08670eaf93dc7b8024a4b60531c5fc.zip FreeBSD-src-459bcc3dba08670eaf93dc7b8024a4b60531c5fc.tar.gz |
statically allocate the station/neighbor node table; the deferred
allocation scheme introduced a race condition during device state
transitions
Diffstat (limited to 'sys/dev/ath')
-rw-r--r-- | sys/dev/ath/ath_rate/amrr/amrr.c | 7 | ||||
-rw-r--r-- | sys/dev/ath/ath_rate/onoe/onoe.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/ath/ath_rate/amrr/amrr.c b/sys/dev/ath/ath_rate/amrr/amrr.c index 18bd4a1..7a2af6f 100644 --- a/sys/dev/ath/ath_rate/amrr/amrr.c +++ b/sys/dev/ath/ath_rate/amrr/amrr.c @@ -361,8 +361,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. */ - if (ic->ic_sta != NULL) - ieee80211_iterate_nodes(ic->ic_sta, ath_rate_cb, 0); + 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) { @@ -467,8 +466,8 @@ ath_ratectl(void *arg) if (ic->ic_opmode == IEEE80211_M_STA) ath_rate_ctl(sc, ic->ic_bss); /* NB: no reference */ - else if (ic->ic_sta != NULL) - ieee80211_iterate_nodes(ic->ic_sta, ath_rate_ctl, sc); + else + ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_ctl, sc); } interval = ath_rateinterval; if (ic->ic_opmode == IEEE80211_M_STA) diff --git a/sys/dev/ath/ath_rate/onoe/onoe.c b/sys/dev/ath/ath_rate/onoe/onoe.c index 1456b09..cb26c5b 100644 --- a/sys/dev/ath/ath_rate/onoe/onoe.c +++ b/sys/dev/ath/ath_rate/onoe/onoe.c @@ -345,8 +345,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. */ - if (ic->ic_sta != NULL) - ieee80211_iterate_nodes(ic->ic_sta, ath_rate_cb, 0); + 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) { @@ -448,8 +447,8 @@ ath_ratectl(void *arg) if (ic->ic_opmode == IEEE80211_M_STA) ath_rate_ctl(sc, ic->ic_bss); /* NB: no reference */ - else if (ic->ic_sta != NULL) - ieee80211_iterate_nodes(ic->ic_sta, ath_rate_ctl, sc); + else + ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_ctl, sc); } interval = ath_rateinterval; if (ic->ic_opmode == IEEE80211_M_STA) |