On 2020-06-04 00:09, John Crispin wrote:
[...]
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -663,6 +663,10 @@ const struct nla_policy
nl80211_policy[NUM_NL80211_ATTR] = {
[NL80211_ATTR_CONTROL_PORT_NO_PREAUTH] = { .type = NLA_FLAG },
[NL80211_ATTR_PMK_LIFETIME] = NLA_POLICY_MIN(NLA_U32, 1),
[NL80211_ATTR_PMK_REAUTH_THRESHOLD] = NLA_POLICY_RANGE(NLA_U8, 1,
100),
+ [NL80211_ATTR_MULTI_BSSID_MODE] = NLA_POLICY_RANGE(NLA_U8,
+ NL80211_MULTIPLE_BSSID_LEGACY,
+ NL80211_MULTIPLE_BSSID_NON_TRANSMITTED),
+ [NL80211_ATTR_MULTI_BSSID_PARENT] = { .type = NLA_U32 },
If it is read as u8, better define as NLA_U8.
};
/* policy for the key attributes */
@@ -3756,6 +3760,16 @@ static int nl80211_new_interface(struct sk_buff
*skb, struct genl_info *info)
if (err < 0)
return err;
+ if (info->attrs[NL80211_ATTR_MULTI_BSSID_MODE])
+ params.multi_bssid_mode =
+ nla_get_u8(info->attrs[NL80211_ATTR_MULTI_BSSID_MODE]);
+ if (info->attrs[NL80211_ATTR_MULTI_BSSID_PARENT])
+ params.multi_bssid_parent =
+ nla_get_u8(info->attrs[NL80211_ATTR_MULTI_BSSID_PARENT]);
+ if (params.multi_bssid_mode == NL80211_MULTIPLE_BSSID_NON_TRANSMITTED
&&
+ !params.multi_bssid_parent)
+ return -EOPNOTSUPP;
+
Are you expecting BSSID or ifindex in multi_bssid_parent? If it is
ifindex, it can be 0. no
-Rajkumar