diff mbox series

mac80211: update rx nss for the link sta

Message ID 20230119135223.18224-1-quic_srirrama@quicinc.com (mailing list archive)
State Superseded
Delegated to: Johannes Berg
Headers show
Series mac80211: update rx nss for the link sta | expand

Commit Message

Sriram R Jan. 19, 2023, 1:52 p.m. UTC
Update nss info for the non default link stations
which gets added during ML assoc when link stations
gets added. For the default link sta which was added
during auth time, the nss would be updated in the usual
flow during set station post assoc once the capabilities
are available.

Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
---
 net/mac80211/cfg.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Johannes Berg Jan. 19, 2023, 3:13 p.m. UTC | #1
Please use wifi: prefix in front of the mac80211: prefix. :)

johannes
Sriram R Jan. 19, 2023, 10:17 p.m. UTC | #2
>-----Original Message-----
>From: Johannes Berg <johannes@sipsolutions.net>
>Sent: Thursday, January 19, 2023 8:43 PM
>To: Sriram R (QUIC) <quic_srirrama@quicinc.com>
>Cc: linux-wireless@vger.kernel.org
>Subject: Re: [PATCH] mac80211: update rx nss for the link sta
>
>WARNING: This email originated from outside of Qualcomm. Please be wary
>of any links or attachments, and do not enable macros.
>
>Please use wifi: prefix in front of the mac80211: prefix. :)
Thanks, I updated in v2.
Sriram.R
diff mbox series

Patch

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 72df8c708a2d..0fdf92e1428f 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1754,6 +1754,15 @@  static int sta_link_apply_parameters(struct ieee80211_local *local,
 						    params->eht_capa_len,
 						    link_sta);
 
+	/* update nss if not done already for the link sta,
+	 * for the deflink the nss will be updated once the
+	 * assoc flag is set through set station. For the
+	 * non-deflink sta we would reach here only during assoc,
+	 * so we would have all caps to calculate the nss.
+	 */
+	if (&sta->deflink != link_sta)
+		ieee80211_sta_set_rx_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