summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-10-27 18:02:47 +0000
committersam <sam@FreeBSD.org>2008-10-27 18:02:47 +0000
commit548a877565d76b89d96569de6eff0d4c6b702d33 (patch)
tree9bdc9920e40a56ea834461e259fd88949f854b0a /sys
parent5134b586b93d7a75f45f2b6731accc3e027d5f60 (diff)
downloadFreeBSD-src-548a877565d76b89d96569de6eff0d4c6b702d33.zip
FreeBSD-src-548a877565d76b89d96569de6eff0d4c6b702d33.tar.gz
fix handling of HT rates; these overlap legacy rates and need to be
marked as MCS in the inverse mapping table
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ath/if_ath.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 4b4e8d3..28a3420 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -6225,8 +6225,13 @@ ath_setcurmode(struct ath_softc *sc, enum ieee80211_phymode mode)
memset(sc->sc_rixmap, 0xff, sizeof(sc->sc_rixmap));
rt = sc->sc_rates[mode];
KASSERT(rt != NULL, ("no h/w rate set for phy mode %u", mode));
- for (i = 0; i < rt->rateCount; i++)
- sc->sc_rixmap[rt->info[i].dot11Rate & IEEE80211_RATE_VAL] = i;
+ for (i = 0; i < rt->rateCount; i++) {
+ uint8_t ieeerate = rt->info[i].dot11Rate & IEEE80211_RATE_VAL;
+ if (rt->info[i].phy != IEEE80211_T_HT)
+ sc->sc_rixmap[ieeerate] = i;
+ else
+ sc->sc_rixmap[ieeerate | IEEE80211_RATE_MCS] = i;
+ }
memset(sc->sc_hwmap, 0, sizeof(sc->sc_hwmap));
for (i = 0; i < 32; i++) {
u_int8_t ix = rt->rateCodeToIndex[i];
OpenPOWER on IntegriCloud