94e51afd859529b07dbf06dc5c04fbc722e6ff74
[openwrt/staging/nbd.git] /
1 From: Benjamin Lin <benjamin-jw.lin@mediatek.com>
2 Date: Mon, 18 Nov 2024 16:07:22 +0800
3 Subject: [PATCH] wifi: mac80211: fix incorrect timing to initialize
4 station NSS capability
5
6 Station's spatial streaming capability should be initialized before
7 handling VHT OMN, because the handling requires the capability information.
8
9 Fixes: a8bca3e9371d ("wifi: mac80211: track capability/opmode NSS separately")
10 Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
11 ---
12
13 --- a/net/mac80211/cfg.c
14 +++ b/net/mac80211/cfg.c
15 @@ -1914,6 +1914,8 @@ static int sta_link_apply_parameters(str
16 params->eht_capa_len,
17 link_sta);
18
19 + ieee80211_sta_init_nss(link_sta);
20 +
21 if (params->opmode_notif_used) {
22 /* returned value is only needed for rc update, but the
23 * rc isn't initialized here yet, so ignore it
24 @@ -1923,8 +1925,6 @@ static int sta_link_apply_parameters(str
25 sband->band);
26 }
27
28 - ieee80211_sta_init_nss(link_sta);
29 -
30 return 0;
31 }
32