From cdfdda2a733f6ecb2cd65ad534d58dd92615c726 Mon Sep 17 00:00:00 2001 From: Benjamin Lin Date: Thu, 13 Mar 2025 13:21:44 +0900 Subject: [PATCH] wifi: mac80211: fix station NSS capability initialization order BugLink: https://bugs.launchpad.net/bugs/2102181 [ 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 Signed-off-by: Koichiro Den Signed-off-by: Mehmet Basaran --- net/mac80211/cfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index e1acf4863ec9..3e343108f116 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1861,6 +1861,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 @@ -1870,8 +1872,6 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, sband->band); } - ieee80211_sta_init_nss(link_sta); - return 0; }