diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-10-06 13:35:03 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-10-11 10:01:02 -0400 |
commit | 37439f2d6e43ae79e22be9be159f0af157468f82 (patch) | |
tree | 1cc72c5ad6bc59f60011512213aa89a48eb51d31 | |
parent | 202df504d7dea489ce74a913d4b529531bdff312 (diff) |
mac80211: minstrel: fix using short preamble CCK rates on HT clients
mi->supported[MINSTREL_CCK_GROUP] needs to be updated
short preamble rates need to be marked as supported regardless of
whether it's currently enabled. Its state can change at any time without
a rate_update call.
Fixes: 782dda00ab8e ("mac80211: minstrel_ht: move short preamble check out of get_rate")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 38e17ed20d41..118ffe7f88c4 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c | |||
@@ -1135,7 +1135,6 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, | |||
1135 | struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; | 1135 | struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; |
1136 | u16 ht_cap = sta->ht_cap.cap; | 1136 | u16 ht_cap = sta->ht_cap.cap; |
1137 | struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; | 1137 | struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; |
1138 | struct sta_info *sinfo = container_of(sta, struct sta_info, sta); | ||
1139 | int use_vht; | 1138 | int use_vht; |
1140 | int n_supported = 0; | 1139 | int n_supported = 0; |
1141 | int ack_dur; | 1140 | int ack_dur; |
@@ -1265,8 +1264,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, | |||
1265 | if (!n_supported) | 1264 | if (!n_supported) |
1266 | goto use_legacy; | 1265 | goto use_legacy; |
1267 | 1266 | ||
1268 | if (test_sta_flag(sinfo, WLAN_STA_SHORT_PREAMBLE)) | 1267 | mi->supported[MINSTREL_CCK_GROUP] |= mi->cck_supported_short << 4; |
1269 | mi->cck_supported_short |= mi->cck_supported_short << 4; | ||
1270 | 1268 | ||
1271 | /* create an initial rate table with the lowest supported rates */ | 1269 | /* create an initial rate table with the lowest supported rates */ |
1272 | minstrel_ht_update_stats(mp, mi); | 1270 | minstrel_ht_update_stats(mp, mi); |