blob: e31009b3f38f018f36b33173f2607a29f68bce5b [file] [log] [blame]
developer617abbd2024-04-23 14:50:01 +08001From edef4ae672b3d124b573c1c9856d6435f30b6bb5 Mon Sep 17 00:00:00 2001
2From: 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
12CR-Id: WCNCR00274293
13Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
14Change-Id: I3be945036afe677a54e328685fd2fe7b725c6ed5
15---
16 net/mac80211/mlme.c | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
20index ebdcf57..b9d10e9 100644
21--- a/net/mac80211/mlme.c
22+++ b/net/mac80211/mlme.c
23@@ -4398,7 +4398,8 @@ static bool ieee80211_assoc_config_link(struct ieee80211_link_data *link,
24 sband = local->hw.wiphy->bands[link->conf->chanreq.oper.chan->band];
25
26 /* Set up internal HT/VHT capabilities */
27- if (elems->ht_cap_elem && link->u.mgd.conn.mode >= IEEE80211_CONN_MODE_HT)
28+ if (elems->ht_cap_elem && link->u.mgd.conn.mode >= IEEE80211_CONN_MODE_HT &&
29+ !is_6ghz)
30 ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
31 elems->ht_cap_elem,
32 link_sta);
33--
342.39.2
35