502d8c7768cc1bb2b429359d0496797104a64d9f
[openwrt/staging/blogic.git] /
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Sat, 10 Feb 2018 13:43:07 +0100
3 Subject: [PATCH] mac80211: minstrel: fix using short preamble CCK rates on
4 HT clients
5
6 mi->supported[MINSTREL_CCK_GROUP] needs to be updated
7
8 Fixes: 782dda00ab8e ("mac80211: minstrel_ht: move short preamble check out of get_rate")
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/net/mac80211/rc80211_minstrel_ht.c
13 +++ b/net/mac80211/rc80211_minstrel_ht.c
14 @@ -1135,7 +1135,6 @@ minstrel_ht_update_caps(void *priv, stru
15 struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
16 u16 ht_cap = sta->ht_cap.cap;
17 struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
18 - struct sta_info *sinfo = container_of(sta, struct sta_info, sta);
19 int use_vht;
20 int n_supported = 0;
21 int ack_dur;
22 @@ -1267,8 +1266,7 @@ minstrel_ht_update_caps(void *priv, stru
23 if (!n_supported)
24 goto use_legacy;
25
26 - if (test_sta_flag(sinfo, WLAN_STA_SHORT_PREAMBLE))
27 - mi->cck_supported_short |= mi->cck_supported_short << 4;
28 + mi->supported[MINSTREL_CCK_GROUP] |= mi->cck_supported_short << 4;
29
30 /* create an initial rate table with the lowest supported rates */
31 minstrel_ht_update_stats(mp, mi);