From: Benjamin Lin Date: Mon, 18 Nov 2024 08:07:22 +0000 (+0800) Subject: wifi: mac80211: fix station NSS capability initialization order X-Git-Tag: v6.1.121~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3faaad820cca8d782e7affa2d02bab1ea1dbbf44;p=thirdparty%2Fkernel%2Fstable.git wifi: mac80211: fix station NSS capability initialization order [ Upstream commit 819e0f1e58e0ba3800cd9eb96b2a39e44e49df97 ] Station's spatial streaming capability should be initialized before handling VHT OMN, because the handling requires the capability information. Fixes: a8bca3e9371d ("wifi: mac80211: track capability/opmode NSS separately") Signed-off-by: Benjamin Lin Link: https://patch.msgid.link/20241118080722.9603-1-benjamin-jw.lin@mediatek.com [rewrite subject] Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index aa5daa2fad111..be48d3f7ffcd6 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1767,6 +1767,8 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, params->eht_capa_len, link_sta); + ieee80211_sta_init_nss(link_sta); + if (params->opmode_notif_used) { /* returned value is only needed for rc update, but the * rc isn't initialized here yet, so ignore it @@ -1776,8 +1778,6 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, sband->band); } - ieee80211_sta_init_nss(link_sta); - return 0; }