| From 6043522521b98b4107c339d399fd64b52b60f192 Mon Sep 17 00:00:00 2001 |
| From: Allen Ye <allen.ye@mediatek.com> |
| Date: Wed, 10 Jul 2024 17:45:05 +0800 |
| Subject: [PATCH 84/89] mtk: mac80211: Fix channel switch punct bitmap would be |
| clean bug in STA mode |
| |
| The patch add back the puncture bitmap when mac80211 create a new channel |
| definition in ieee80211_chandef_ht_oper for legacy cap check. |
| |
| Signed-off-by: Allen Ye <allen.ye@mediatek.com> |
| --- |
| net/mac80211/spectmgmt.c | 4 ++++ |
| 1 file changed, 4 insertions(+) |
| |
| diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c |
| index 073ff9e..e8ac8ec 100644 |
| --- a/net/mac80211/spectmgmt.c |
| +++ b/net/mac80211/spectmgmt.c |
| @@ -76,6 +76,7 @@ validate_chandef_by_ht_vht_oper(struct ieee80211_sub_if_data *sdata, |
| struct cfg80211_chan_def *chandef) |
| { |
| u32 control_freq, center_freq1, center_freq2; |
| + u16 punct_bitmap; |
| enum nl80211_chan_width chan_width; |
| struct ieee80211_ht_operation ht_oper; |
| struct ieee80211_vht_operation vht_oper; |
| @@ -90,6 +91,7 @@ validate_chandef_by_ht_vht_oper(struct ieee80211_sub_if_data *sdata, |
| center_freq1 = chandef->center_freq1; |
| center_freq2 = chandef->center_freq2; |
| chan_width = chandef->width; |
| + punct_bitmap = chandef->punctured; |
| |
| ht_oper.primary_chan = ieee80211_frequency_to_channel(control_freq); |
| if (control_freq != center_freq1) |
| @@ -101,6 +103,8 @@ validate_chandef_by_ht_vht_oper(struct ieee80211_sub_if_data *sdata, |
| |
| ieee80211_chandef_ht_oper(&ht_oper, chandef); |
| |
| + chandef->punctured = punct_bitmap; |
| + |
| if (conn->mode < IEEE80211_CONN_MODE_VHT) |
| return; |
| |
| -- |
| 2.18.0 |
| |