Don't rely on MCS7 being at index 7 while determining the amount

of antennas to use. Not all APs enable all MCS rates.

Poked by:	Lucius Windschuh <lwindschuh at googlemail dot com>
MFC after:	1 week
This commit is contained in:
Bernhard Schmidt 2012-01-03 09:42:31 +00:00
parent 46632c18bd
commit 3e51210689

View File

@ -2128,7 +2128,7 @@ iwn_newassoc(struct ieee80211_node *ni, int isnew)
plcp |= IWN_RFLAG_SGI;
} else if (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20)
plcp |= IWN_RFLAG_SGI;
if (i > 7)
if (RV(ni->ni_htrates.rs_rates[i]) > 7)
plcp |= IWN_RFLAG_ANT(txant1 | txant2);
else
plcp |= IWN_RFLAG_ANT(txant1);