developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 1 | From 6043522521b98b4107c339d399fd64b52b60f192 Mon Sep 17 00:00:00 2001 |
| 2 | From: Allen Ye <allen.ye@mediatek.com> |
| 3 | Date: Wed, 10 Jul 2024 17:45:05 +0800 |
| 4 | Subject: [PATCH 84/89] mtk: mac80211: Fix channel switch punct bitmap would be |
| 5 | clean bug in STA mode |
| 6 | |
| 7 | The patch add back the puncture bitmap when mac80211 create a new channel |
| 8 | definition in ieee80211_chandef_ht_oper for legacy cap check. |
| 9 | |
| 10 | Signed-off-by: Allen Ye <allen.ye@mediatek.com> |
| 11 | --- |
| 12 | net/mac80211/spectmgmt.c | 4 ++++ |
| 13 | 1 file changed, 4 insertions(+) |
| 14 | |
| 15 | diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c |
| 16 | index 073ff9e..e8ac8ec 100644 |
| 17 | --- a/net/mac80211/spectmgmt.c |
| 18 | +++ b/net/mac80211/spectmgmt.c |
| 19 | @@ -76,6 +76,7 @@ validate_chandef_by_ht_vht_oper(struct ieee80211_sub_if_data *sdata, |
| 20 | struct cfg80211_chan_def *chandef) |
| 21 | { |
| 22 | u32 control_freq, center_freq1, center_freq2; |
| 23 | + u16 punct_bitmap; |
| 24 | enum nl80211_chan_width chan_width; |
| 25 | struct ieee80211_ht_operation ht_oper; |
| 26 | struct ieee80211_vht_operation vht_oper; |
| 27 | @@ -90,6 +91,7 @@ validate_chandef_by_ht_vht_oper(struct ieee80211_sub_if_data *sdata, |
| 28 | center_freq1 = chandef->center_freq1; |
| 29 | center_freq2 = chandef->center_freq2; |
| 30 | chan_width = chandef->width; |
| 31 | + punct_bitmap = chandef->punctured; |
| 32 | |
| 33 | ht_oper.primary_chan = ieee80211_frequency_to_channel(control_freq); |
| 34 | if (control_freq != center_freq1) |
| 35 | @@ -101,6 +103,8 @@ validate_chandef_by_ht_vht_oper(struct ieee80211_sub_if_data *sdata, |
| 36 | |
| 37 | ieee80211_chandef_ht_oper(&ht_oper, chandef); |
| 38 | |
| 39 | + chandef->punctured = punct_bitmap; |
| 40 | + |
| 41 | if (conn->mode < IEEE80211_CONN_MODE_VHT) |
| 42 | return; |
| 43 | |
| 44 | -- |
| 45 | 2.18.0 |
| 46 | |