diff options
author | sam <sam@FreeBSD.org> | 2005-11-15 05:47:20 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-11-15 05:47:20 +0000 |
commit | 0ad5382f7778c215bfa1b8fda30059c015810ab9 (patch) | |
tree | ea64f7b73fefb244e438243275098538040eb36e /sys/dev | |
parent | d54182e3d7be43c43c7749f6311cdcf0eec69956 (diff) | |
download | FreeBSD-src-0ad5382f7778c215bfa1b8fda30059c015810ab9.zip FreeBSD-src-0ad5382f7778c215bfa1b8fda30059c015810ab9.tar.gz |
bandaid inconsistent state handling: the rate index map may be
stale when called to reset rate control state causing us to
pickup an invalid index, check for this and skip 'em (things
will eventually get fixed up so this is not harmful)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ath/ath_rate/sample/sample.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_rate/sample/sample.c b/sys/dev/ath/ath_rate/sample/sample.c index 7acdc5c..f7b2920 100644 --- a/sys/dev/ath/ath_rate/sample/sample.c +++ b/sys/dev/ath/ath_rate/sample/sample.c @@ -710,6 +710,11 @@ ath_rate_ctl_reset(struct ath_softc *sc, struct ieee80211_node *ni) for (x = 0; x < ni->ni_rates.rs_nrates; x++) { sn->rates[x].rate = ni->ni_rates.rs_rates[x] & IEEE80211_RATE_VAL; sn->rates[x].rix = sc->sc_rixmap[sn->rates[x].rate]; + if (sn->rates[x].rix == 0xff) { + DPRINTF(sc, "%s: ignore bogus rix at %d\n", + __func__, x); + continue; + } sn->rates[x].rateCode = rt->info[sn->rates[x].rix].rateCode; sn->rates[x].shortPreambleRateCode = rt->info[sn->rates[x].rix].rateCode | |