Date: Sun, 19 Oct 2008 20:37:00 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 151569 for review Message-ID: <200810192037.m9JKb0p9049514@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151569 Change 151569 by sam@sam_ebb on 2008/10/19 20:36:42 Fix calculation of the table that maps ieee rates to indices into the hal phy/rate table: HT rate tables have overlapping ieee rates as there are entries for both legacy rates and MCS. Distinguish MCS using the IEEE80211_RATE_MCS bit. This fixes complaints in sample about bogus rate codes when associated to an 11n ap on an 11n channel. Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#109 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#109 (text+ko) ==== @@ -6171,8 +6171,13 @@ 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 < N(sc->sc_hwmap); i++) { if (i >= rt->rateCount) { @@ -6183,7 +6188,7 @@ sc->sc_hwmap[i].ieeerate = rt->info[i].dot11Rate & IEEE80211_RATE_VAL; if (rt->info[i].phy == IEEE80211_T_HT) - sc->sc_hwmap[i].ieeerate |= 0x80; /* MCS */ + sc->sc_hwmap[i].ieeerate |= IEEE80211_RATE_MCS; sc->sc_hwmap[i].txflags = IEEE80211_RADIOTAP_F_DATAPAD; if (rt->info[i].shortPreamble || rt->info[i].phy == IEEE80211_T_OFDM)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810192037.m9JKb0p9049514>