Message ID | 20240731122201.2635010-1-quic_ssreeela@quicinc.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Johannes Berg |
Headers | show |
Series | [v2] wifi: nl80211: allow MBSSID Tx VAP bringup without MBSSID Elements | expand |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 7397a372c78e..f1b0274681b9 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5496,8 +5496,10 @@ 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 (config->ema && !config->index && !num_elems) return -EINVAL; if (tb[NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX]) {