summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2019-04-09 14:11:20 +0200
committerJohannes Berg <johannes.berg@intel.com>2019-04-10 14:13:54 +0200
commite9f33a8fee53c2d4bcdeec9a89478b4bf17bfbbc (patch)
tree842bad470c0a2912b9ec014db424305ecc85d08a /net
parentc03fd0171ba6c8807ff5ba7c797896c84e18f3bc (diff)
downloadlinux-e9f33a8fee53c2d4bcdeec9a89478b4bf17bfbbc.tar.gz
linux-e9f33a8fee53c2d4bcdeec9a89478b4bf17bfbbc.tar.bz2
linux-e9f33a8fee53c2d4bcdeec9a89478b4bf17bfbbc.zip
mac80211: fix RX STBC override byte order
The original patch neglected to take byte order conversions into account, fix that. Fixes: d9bb410888ce ("mac80211: allow overriding HT STBC capabilities") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ht.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index e03c46ac8e4d..c62101857b9b 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -112,8 +112,9 @@ void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
IEEE80211_HT_CAP_TX_STBC);
/* Allow user to configure RX STBC bits */
- if (ht_capa_mask->cap_info & IEEE80211_HT_CAP_RX_STBC)
- ht_cap->cap |= ht_capa->cap_info & IEEE80211_HT_CAP_RX_STBC;
+ if (ht_capa_mask->cap_info & cpu_to_le16(IEEE80211_HT_CAP_RX_STBC))
+ ht_cap->cap |= le16_to_cpu(ht_capa->cap_info) &
+ IEEE80211_HT_CAP_RX_STBC;
/* Allow user to decrease AMPDU factor */
if (ht_capa_mask->ampdu_params_info &