summaryrefslogtreecommitdiffstats
path: root/net/mac80211/spectmgmt.c
diff options
context:
space:
mode:
authorShay Bar <shay.bar@celeno.com>2020-12-22 08:47:14 +0200
committerJohannes Berg <johannes.berg@intel.com>2021-01-21 13:39:11 +0100
commitdcf3c8fb32ddbfa3b8227db38aa6746405bd4527 (patch)
tree19a5fb61f813cc7dfcd7e5f65b77f3ccfcc9197c /net/mac80211/spectmgmt.c
parent1c45ba93d34cd6af75228f34d0675200c81738b5 (diff)
downloadlinux-dcf3c8fb32ddbfa3b8227db38aa6746405bd4527.tar.gz
linux-dcf3c8fb32ddbfa3b8227db38aa6746405bd4527.tar.bz2
linux-dcf3c8fb32ddbfa3b8227db38aa6746405bd4527.zip
mac80211: 160MHz with extended NSS BW in CSA
Upon receiving CSA with 160MHz extended NSS BW from associated AP, STA should set the HT operation_mode based on new_center_freq_seg1 because it is later used as ccfs2 in ieee80211_chandef_vht_oper(). Signed-off-by: Aviad Brikman <aviad.brikman@celeno.com> Signed-off-by: Shay Bar <shay.bar@celeno.com> Link: https://lore.kernel.org/r/20201222064714.24888-1-shay.bar@celeno.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/spectmgmt.c')
-rw-r--r--net/mac80211/spectmgmt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index ae1cb2c68722..76747bfdaddd 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -133,16 +133,20 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
}
if (wide_bw_chansw_ie) {
+ u8 new_seg1 = wide_bw_chansw_ie->new_center_freq_seg1;
struct ieee80211_vht_operation vht_oper = {
.chan_width =
wide_bw_chansw_ie->new_channel_width,
.center_freq_seg0_idx =
wide_bw_chansw_ie->new_center_freq_seg0,
- .center_freq_seg1_idx =
- wide_bw_chansw_ie->new_center_freq_seg1,
+ .center_freq_seg1_idx = new_seg1,
/* .basic_mcs_set doesn't matter */
};
- struct ieee80211_ht_operation ht_oper = {};
+ struct ieee80211_ht_operation ht_oper = {
+ .operation_mode =
+ cpu_to_le16(new_seg1 <<
+ IEEE80211_HT_OP_MODE_CCFS2_SHIFT),
+ };
/* default, for the case of IEEE80211_VHT_CHANWIDTH_USE_HT,
* to the previously parsed chandef