]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mac80211: fix station NSS capability initialization order
authorBenjamin Lin <benjamin-jw.lin@mediatek.com>
Mon, 18 Nov 2024 08:07:22 +0000 (16:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Dec 2024 17:08:52 +0000 (18:08 +0100)
[ 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 <benjamin-jw.lin@mediatek.com>
Link: https://patch.msgid.link/20241118080722.9603-1-benjamin-jw.lin@mediatek.com
[rewrite subject]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/cfg.c

index aa5daa2fad1111cbe17c254faec59d446f2f894f..be48d3f7ffcd619c03ae4bf346aa27ee376cce98 100644 (file)
@@ -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;
 }