svn commit: r184365 - head/sys/dev/ath
Sam Leffler
sam at FreeBSD.org
Mon Oct 27 11:02:47 PDT 2008
Author: sam
Date: Mon Oct 27 18:02:47 2008
New Revision: 184365
URL: http://svn.freebsd.org/changeset/base/184365
Log:
fix handling of HT rates; these overlap legacy rates and need to be
marked as MCS in the inverse mapping table
Modified:
head/sys/dev/ath/if_ath.c
Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c Mon Oct 27 18:00:43 2008 (r184364)
+++ head/sys/dev/ath/if_ath.c Mon Oct 27 18:02:47 2008 (r184365)
@@ -6225,8 +6225,13 @@ ath_setcurmode(struct ath_softc *sc, enu
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];
More information about the svn-src-head
mailing list