diff mbox series

wifi: nl80211: allow MBSSID Tx VAP bringup without MBSSID IEs

Message ID 20240621074038.3938005-1-quic_ssreeela@quicinc.com (mailing list archive)
State Under Review
Delegated to: Johannes Berg
Headers show
Series wifi: nl80211: allow MBSSID Tx VAP bringup without MBSSID IEs | expand

Commit Message

Sowmiya Sree Elavalagan June 21, 2024, 7:40 a.m. UTC
From: Rameshkumar Sundaram <quic_ramess@quicinc.com>

Current implementation of MBSSID configuration parsing mandates
MBSSID elements for Tx BSS (index 0). However with ML link addition
it is possible that Non-Tx BSS'es can be added at a later point in
time after Tx BSS is brought up. Hence allow bring up of MBSSID Tx
BSS even if no Non-Tx BSS are present at that time. Later when new
Non-TX BSS are added TX BSS beacon can be updated with MBSSID IEs.

Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Signed-off-by: Sowmiya Sree Elavalagan <quic_ssreeela@quicinc.com>
---
 net/wireless/nl80211.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Johannes Berg June 26, 2024, 12:15 p.m. UTC | #1
On Fri, 2024-06-21 at 13:10 +0530, Sowmiya Sree Elavalagan wrote:
> From: Rameshkumar Sundaram <quic_ramess@quicinc.com>
> 
> Current implementation of MBSSID configuration parsing mandates
> MBSSID elements for Tx BSS (index 0). However with ML link addition
> it is possible that Non-Tx BSS'es can be added at a later point in
> time after Tx BSS is brought up. Hence allow bring up of MBSSID Tx
> BSS even if no Non-Tx BSS are present at that time. Later when new
> Non-TX BSS are added TX BSS beacon can be updated with MBSSID IEs.

nit: I tend to think we should mostly use "element" instead of "IE"
since the spec changed (subject and text), except where historically we
have variable names etc.

I'm also not convinced this actually works without further changes down
the stack? Think ath11k/mac80211 for example, where
ieee80211_beacon_get_template_ema_list() is called but would now return
NULL because 

                if (ema_beacons) {
                        *ema_beacons =
                                ieee80211_beacon_get_ap_ema_list(hw, vif, link,

but the list is empty.

But you can still set NL80211_MBSSID_CONFIG_ATTR_EMA so it would be an
EMA AP, and have config->tx_wdev set ...

So I don't think this can be correct?

johannes
diff mbox series

Patch

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index fcac7dedcd61..e579cc0c860c 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -5400,8 +5400,7 @@  static int nl80211_parse_mbssid_config(struct wiphy *wiphy,
 	}
 
 	config->index = nla_get_u8(tb[NL80211_MBSSID_CONFIG_ATTR_INDEX]);
-	if (config->index >= wiphy->mbssid_max_interfaces ||
-	    (!config->index && !num_elems))
+	if (config->index >= wiphy->mbssid_max_interfaces)
 		return -EINVAL;
 
 	if (tb[NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX]) {