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