wlan-ap-Telecominfraproject/feeds/wifi-ax/mac80211/patches/qca/345-mac80211-fix-mixed-declaration.patch
John Crispin d29c4e49b3 mac80211-qsdk: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00

58 lines
2.0 KiB
Diff

From b3215eee07d071137e6977d60eee3cf685241fbb Mon Sep 17 00:00:00 2001
From: Hari Chandrakanthan <quic_haric@quicinc.com>
Date: Thu, 3 Feb 2022 13:55:53 +0530
Subject: [PATCH] mac80211 : fix mixed declaration
Fix mixed declaration in the api ieee80211_parse_ch_switch_ie
Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
---
net/mac80211/spectmgmt.c | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index 76747bf..7ddfb96 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -33,7 +33,10 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
struct cfg80211_chan_def new_vht_chandef = {};
const struct ieee80211_sec_chan_offs_ie *sec_chan_offs;
const struct ieee80211_wide_bw_chansw_ie *wide_bw_chansw_ie;
+ struct ieee80211_vht_operation vht_oper;
+ struct ieee80211_ht_operation ht_oper;
int secondary_channel_offset = -1;
+ u8 new_seg1;
memset(csa_ie, 0, sizeof(*csa_ie));
@@ -133,20 +136,13 @@ 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 = new_seg1,
+ new_seg1 = wide_bw_chansw_ie->new_center_freq_seg1;
+ vht_oper.chan_width = wide_bw_chansw_ie->new_channel_width;
+ vht_oper.center_freq_seg0_idx = wide_bw_chansw_ie->new_center_freq_seg0;
+ vht_oper.center_freq_seg1_idx = new_seg1;
/* .basic_mcs_set doesn't matter */
- };
- struct ieee80211_ht_operation ht_oper = {
- .operation_mode =
- cpu_to_le16(new_seg1 <<
- IEEE80211_HT_OP_MODE_CCFS2_SHIFT),
- };
+ 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
--
2.7.4