For UHR, multi-link power-management capability lives there, and
so it's needed that hostapd knows what to advertise, and clients
should have it shown to userspace for information.
Repurpose the existing NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS by
renaming it to NL80211_ATTR_EXT_MLD_CAPA_AND_OPS (with a define
for compatibility) and advertise the capabilities.
We can also later use the value, if needed, to set per-station
capabilities on STAs added to AP interfaces.
Link: https://patch.msgid.link/20260428110915.e808e70feed6.I378a7c017bfc1ebb072fa8d5d1db2ac9b45596c9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* @extended_capabilities_len: length of the extended capabilities
* @eml_capabilities: EML capabilities (for MLO)
* @mld_capa_and_ops: MLD capabilities and operations (for MLO)
+ * @ext_mld_capa_and_ops: Extended MLD capabilities and operations (for MLO)
*/
struct wiphy_iftype_ext_capab {
enum nl80211_iftype iftype;
u8 extended_capabilities_len;
u16 eml_capabilities;
u16 mld_capa_and_ops;
+ u16 ext_mld_capa_and_ops;
};
/**
* @NL80211_ATTR_EPCS: Flag attribute indicating that EPCS is enabled for a
* station interface.
*
- * @NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS: Extended MLD capabilities and
- * operations that userspace implements to use during association/ML
- * link reconfig, currently only "BTM MLD Recommendation For Multiple
- * APs Support". Drivers may set additional flags that they support
- * in the kernel or device.
+ * @NL80211_ATTR_EXT_MLD_CAPA_AND_OPS: Extended MLD capabilities and operations.
+ * For association and link reconfiguration, indicates extra capabilities
+ * that userspace implements, currently only "BTM MLD Recommendation For
+ * Multiple APs Support".
+ * For wiphy information, additional flags that drivers will set, but
+ * this is informational only for userspace (it's not expected to set
+ * these.)
*
* @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index
* of the radio in interest. Internally a value of -1 is used to
NL80211_ATTR_MLO_RECONF_REM_LINKS,
NL80211_ATTR_EPCS,
- NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS,
+ NL80211_ATTR_EXT_MLD_CAPA_AND_OPS,
NL80211_ATTR_WIPHY_RADIO_INDEX,
#define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
#define NL80211_ATTR_CSA_C_OFF_BEACON NL80211_ATTR_CNTDWN_OFFS_BEACON
#define NL80211_ATTR_CSA_C_OFF_PRESP NL80211_ATTR_CNTDWN_OFFS_PRESP
+#define NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS NL80211_ATTR_EXT_MLD_CAPA_AND_OPS
/*
* Allow user space programs to use #ifdef on new attributes by defining them
NL80211_MAX_SUPP_SELECTORS),
[NL80211_ATTR_MLO_RECONF_REM_LINKS] = { .type = NLA_U16 },
[NL80211_ATTR_EPCS] = { .type = NLA_FLAG },
- [NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS] = { .type = NLA_U16 },
+ [NL80211_ATTR_EXT_MLD_CAPA_AND_OPS] = { .type = NLA_U16 },
[NL80211_ATTR_WIPHY_RADIO_INDEX] = { .type = NLA_U8 },
[NL80211_ATTR_S1G_LONG_BEACON_PERIOD] = NLA_POLICY_MIN(NLA_U8, 2),
[NL80211_ATTR_S1G_SHORT_BEACON] =
NL80211_ATTR_MLD_CAPA_AND_OPS,
capab->mld_capa_and_ops)))
goto nla_put_failure;
+ if (rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_MLO &&
+ capab->ext_mld_capa_and_ops &&
+ nla_put_u16(msg,
+ NL80211_ATTR_EXT_MLD_CAPA_AND_OPS,
+ capab->ext_mld_capa_and_ops))
+ goto nla_put_failure;
nla_nest_end(msg, nested_ext_capab);
if (state->split)
goto free;
}
- if (info->attrs[NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS])
+ if (info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS])
req.ext_mld_capa_ops =
- nla_get_u16(info->attrs[NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS]);
+ nla_get_u16(info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS]);
} else {
if (req.link_id >= 0)
return -EINVAL;
return PTR_ERR(req.bss);
ap_addr = req.bss->bssid;
- if (info->attrs[NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS])
+ if (info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS])
return -EINVAL;
}
goto out;
}
- if (info->attrs[NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS])
+ if (info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS])
req.ext_mld_capa_ops =
- nla_get_u16(info->attrs[NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS]);
+ nla_get_u16(info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS]);
err = cfg80211_assoc_ml_reconf(rdev, dev, &req);