Skip to content

Commit

Permalink
mac80211: minstrel: fix using short preamble CCK rates on HT clients
Browse files Browse the repository at this point in the history
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: 782dda0 ("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>
  • Loading branch information
Felix Fietkau authored and Johannes Berg committed Oct 11, 2018
1 parent 202df50 commit 37439f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/mac80211/rc80211_minstrel_ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,6 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
u16 ht_cap = sta->ht_cap.cap;
struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
struct sta_info *sinfo = container_of(sta, struct sta_info, sta);
int use_vht;
int n_supported = 0;
int ack_dur;
Expand Down Expand Up @@ -1265,8 +1264,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
if (!n_supported)
goto use_legacy;

if (test_sta_flag(sinfo, WLAN_STA_SHORT_PREAMBLE))
mi->cck_supported_short |= mi->cck_supported_short << 4;
mi->supported[MINSTREL_CCK_GROUP] |= mi->cck_supported_short << 4;

/* create an initial rate table with the lowest supported rates */
minstrel_ht_update_stats(mp, mi);
Expand Down

0 comments on commit 37439f2

Please sign in to comment.