Deleted Added
full compact
27c27
< __FBSDID("$FreeBSD: head/sys/net80211/ieee80211_scan_sta.c 215699 2010-11-22 19:01:47Z bschmidt $");
---
> __FBSDID("$FreeBSD: head/sys/net80211/ieee80211_scan_sta.c 219601 2011-03-13 11:58:40Z bschmidt $");
759c759
< int rmax, r, i;
---
> int rmax, r, i, txstream;
760a761
> uint8_t txparams;
766,767c767
< * rate by channel width. Could also include short GI
< * in this if we want to be extra accurate.
---
> * rate by channel width.
769,771c769,779
< /* XXX assumes MCS15 is max */
< for (i = 15; i >= 0 && isclr(htcap->hc_mcsset, i); i--)
< ;
---
> txparams = htcap->hc_mcsset[12];
> if (txparams & 0x3) {
> /*
> * TX MCS parameters defined and not equal to RX,
> * extract the number of spartial streams and
> * map it to the highest MCS rate.
> */
> txstream = ((txparams & 0xc) >> 2) + 1;
> i = txstream * 8 - 1;
> } else
> for (i = 31; i >= 0 && isclr(htcap->hc_mcsset, i); i--);
774,775c782,783
< /* XXX short/long GI */
< if (caps & IEEE80211_HTCAP_CHWIDTH40)
---
> if ((caps & IEEE80211_HTCAP_CHWIDTH40) &&
> (caps & IEEE80211_HTCAP_SHORTGI40))
777c785
< else
---
> else if (caps & IEEE80211_HTCAP_CHWIDTH40)
778a787,790
> else if (caps & IEEE80211_HTCAP_SHORTGI20)
> rmax = ieee80211_htrates[i].ht20_rate_400ns;
> else
> rmax = ieee80211_htrates[i].ht20_rate_800ns;