blob: 70677ddba6c91c65c1dc157e9c052499b257d836 [file] [log] [blame]
developer5f1d3ca2024-04-25 05:25:22 +08001From 53ca97bf26ea7ce77d2cf34b90349e08d2569326 Mon Sep 17 00:00:00 2001
developer0415fc32024-04-19 18:29:00 +08002From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Thu, 15 Feb 2024 14:30:02 +0800
4Subject: [PATCH 51/61] mtk: mac80211: fix ieee80211_ht_cap_ie_to_sta_ht_cap
5 warn on
6
7Fix ieee80211_ht_cap_ie_to_sta_ht_cap warning.
8For MLD with a 2/5G primary link, auth/assoc is done in the 2G or 5G link.
9Therefore, 6G link will enter ieee80211_ht_cap_ie_to_sta_ht_cap, as elems->ht_cap_elem of 2/5G is NOT NULL.
10This should be avoided; otherwise, if 6G is bw 320, then the warning will be triggered.
11
developer0415fc32024-04-19 18:29:00 +080012Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
developer0415fc32024-04-19 18:29:00 +080013---
14 net/mac80211/mlme.c | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
18index ebdcf57..b9d10e9 100644
19--- a/net/mac80211/mlme.c
20+++ b/net/mac80211/mlme.c
21@@ -4398,7 +4398,8 @@ static bool ieee80211_assoc_config_link(struct ieee80211_link_data *link,
22 sband = local->hw.wiphy->bands[link->conf->chanreq.oper.chan->band];
23
24 /* Set up internal HT/VHT capabilities */
25- if (elems->ht_cap_elem && link->u.mgd.conn.mode >= IEEE80211_CONN_MODE_HT)
26+ if (elems->ht_cap_elem && link->u.mgd.conn.mode >= IEEE80211_CONN_MODE_HT &&
27+ !is_6ghz)
28 ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
29 elems->ht_cap_elem,
30 link_sta);
31--
developer5f1d3ca2024-04-25 05:25:22 +0800322.18.0
developer0415fc32024-04-19 18:29:00 +080033