Commit 8d705195 authored by Naftali Goldstein's avatar Naftali Goldstein Committed by Greg Kroah-Hartman

mac80211: fix saving a few HE values

[ Upstream commit 77cbbc35 ]

After masking the he_oper_params, to get the requested values as
integers one must rshift and not lshift.  Fix that by using the
le32_get_bits() macro.

Fixes: 41cbb0f5 ("mac80211: add support for HE")
Signed-off-by: default avatarNaftali Goldstein <naftali.goldstein@intel.com>
[converted to use le32_get_bits()]
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4d146d72
...@@ -3255,19 +3255,16 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata, ...@@ -3255,19 +3255,16 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
} }
if (bss_conf->he_support) { if (bss_conf->he_support) {
u32 he_oper_params = bss_conf->bss_color =
le32_to_cpu(elems.he_operation->he_oper_params); le32_get_bits(elems.he_operation->he_oper_params,
IEEE80211_HE_OPERATION_BSS_COLOR_MASK);
bss_conf->bss_color = he_oper_params &
IEEE80211_HE_OPERATION_BSS_COLOR_MASK;
bss_conf->htc_trig_based_pkt_ext = bss_conf->htc_trig_based_pkt_ext =
(he_oper_params & le32_get_bits(elems.he_operation->he_oper_params,
IEEE80211_HE_OPERATION_DFLT_PE_DURATION_MASK) << IEEE80211_HE_OPERATION_DFLT_PE_DURATION_MASK);
IEEE80211_HE_OPERATION_DFLT_PE_DURATION_OFFSET;
bss_conf->frame_time_rts_th = bss_conf->frame_time_rts_th =
(he_oper_params & le32_get_bits(elems.he_operation->he_oper_params,
IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK) << IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK);
IEEE80211_HE_OPERATION_RTS_THRESHOLD_OFFSET;
bss_conf->multi_sta_back_32bit = bss_conf->multi_sta_back_32bit =
sta->sta.he_cap.he_cap_elem.mac_cap_info[2] & sta->sta.he_cap.he_cap_elem.mac_cap_info[2] &
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment