1 --- a/net/mac80211/rc80211_minstrel_ht.c
2 +++ b/net/mac80211/rc80211_minstrel_ht.c
3 @@ -659,18 +659,14 @@ minstrel_ht_update_caps(void *priv, stru
4 struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
5 struct ieee80211_local *local = hw_to_local(mp->hw);
6 u16 sta_cap = sta->ht_cap.cap;
12 /* fall back to the old minstrel for legacy stations */
13 - if (!sta->ht_cap.ht_supported) {
15 - memset(&msp->legacy, 0, sizeof(msp->legacy));
16 - msp->legacy.r = msp->ratelist;
17 - msp->legacy.sample_table = msp->sample_table;
18 - return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy);
20 + if (!sta->ht_cap.ht_supported)
23 BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) !=
24 MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS);
25 @@ -725,7 +721,22 @@ minstrel_ht_update_caps(void *priv, stru
27 mi->groups[i].supported =
28 mcs->rx_mask[minstrel_mcs_groups[i].streams - 1];
30 + if (mi->groups[i].supported)
41 + memset(&msp->legacy, 0, sizeof(msp->legacy));
42 + msp->legacy.r = msp->ratelist;
43 + msp->legacy.sample_table = msp->sample_table;
44 + return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy);