developer | 617abbd | 2024-04-23 14:50:01 +0800 | [diff] [blame^] | 1 | From edef4ae672b3d124b573c1c9856d6435f30b6bb5 Mon Sep 17 00:00:00 2001 |
| 2 | From: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 3 | Date: Thu, 15 Feb 2024 14:30:02 +0800 |
| 4 | Subject: [PATCH 51/61] mtk: mac80211: fix ieee80211_ht_cap_ie_to_sta_ht_cap |
| 5 | warn on |
| 6 | |
| 7 | Fix ieee80211_ht_cap_ie_to_sta_ht_cap warning. |
| 8 | For MLD with a 2/5G primary link, auth/assoc is done in the 2G or 5G link. |
| 9 | Therefore, 6G link will enter ieee80211_ht_cap_ie_to_sta_ht_cap, as elems->ht_cap_elem of 2/5G is NOT NULL. |
| 10 | This should be avoided; otherwise, if 6G is bw 320, then the warning will be triggered. |
| 11 | |
| 12 | CR-Id: WCNCR00274293 |
| 13 | Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 14 | Change-Id: I3be945036afe677a54e328685fd2fe7b725c6ed5 |
| 15 | --- |
| 16 | net/mac80211/mlme.c | 3 ++- |
| 17 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 18 | |
| 19 | diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c |
| 20 | index 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 | -- |
| 34 | 2.39.2 |
| 35 | |