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.
Unified · Split
| @@ -5969,6 +5969,7 @@ struct wiphy_vendor_command { · 5968 unmodified lines | |||
| 5969 | * @extended_capabilities_len: length of the extended capabilities | 5969 | * @extended_capabilities_len: length of the extended capabilities |
| 5970 | * @eml_capabilities: EML capabilities (for MLO) | 5970 | * @eml_capabilities: EML capabilities (for MLO) |
| 5971 | * @mld_capa_and_ops: MLD capabilities and operations (for MLO) | 5971 | * @mld_capa_and_ops: MLD capabilities and operations (for MLO) |
| 5972 | * @ext_mld_capa_and_ops: Extended MLD capabilities and operations (for MLO) | ||
| 5972 | */ | 5973 | */ |
| 5973 | struct wiphy_iftype_ext_capab { | 5974 | struct wiphy_iftype_ext_capab { |
| 5974 | enum nl80211_iftype iftype; | 5975 | enum nl80211_iftype iftype; |
| @@ -5977,6 +5978,7 @@ struct wiphy_iftype_ext_capab { · 2 unmodified lines | |||
| 5977 | u8 extended_capabilities_len; | 5978 | u8 extended_capabilities_len; |
| 5978 | u16 eml_capabilities; | 5979 | u16 eml_capabilities; |
| 5979 | u16 mld_capa_and_ops; | 5980 | u16 mld_capa_and_ops; |
| 5981 | u16 ext_mld_capa_and_ops; | ||
| 5980 | }; | 5982 | }; |
| 5981 | 5983 | ||
| 5982 | /** | 5984 | /** |
| @@ -3004,11 +3004,13 @@ enum nl80211_commands { · 3003 unmodified lines | |||
| 3004 | * @NL80211_ATTR_EPCS: Flag attribute indicating that EPCS is enabled for a | 3004 | * @NL80211_ATTR_EPCS: Flag attribute indicating that EPCS is enabled for a |
| 3005 | * station interface. | 3005 | * station interface. |
| 3006 | * | 3006 | * |
| 3007 | * @NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS: Extended MLD capabilities and | 3007 | * @NL80211_ATTR_EXT_MLD_CAPA_AND_OPS: Extended MLD capabilities and operations. |
| 3008 | * operations that userspace implements to use during association/ML | 3008 | * For association and link reconfiguration, indicates extra capabilities |
| 3009 | * link reconfig, currently only "BTM MLD Recommendation For Multiple | 3009 | * that userspace implements, currently only "BTM MLD Recommendation For |
| 3010 | * APs Support". Drivers may set additional flags that they support | 3010 | * Multiple APs Support". |
| 3011 | * in the kernel or device. | 3011 | * For wiphy information, additional flags that drivers will set, but |
| 3012 | * this is informational only for userspace (it's not expected to set | ||
| 3013 | * these.) | ||
| 3012 | * | 3014 | * |
| 3013 | * @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index | 3015 | * @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index |
| 3014 | * of the radio in interest. Internally a value of -1 is used to | 3016 | * of the radio in interest. Internally a value of -1 is used to |
| @@ -3715,7 +3717,7 @@ enum nl80211_attrs { · 700 unmodified lines | |||
| 3715 | NL80211_ATTR_MLO_RECONF_REM_LINKS, | 3717 | NL80211_ATTR_MLO_RECONF_REM_LINKS, |
| 3716 | NL80211_ATTR_EPCS, | 3718 | NL80211_ATTR_EPCS, |
| 3717 | 3719 | ||
| 3718 | NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS, | 3720 | NL80211_ATTR_EXT_MLD_CAPA_AND_OPS, |
| 3719 | 3721 | ||
| 3720 | NL80211_ATTR_WIPHY_RADIO_INDEX, | 3722 | NL80211_ATTR_WIPHY_RADIO_INDEX, |
| 3721 | 3723 | ||
| @@ -3769,6 +3771,7 @@ enum nl80211_attrs { · 47 unmodified lines | |||
| 3769 | #define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA | 3771 | #define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA |
| 3770 | #define NL80211_ATTR_CSA_C_OFF_BEACON NL80211_ATTR_CNTDWN_OFFS_BEACON | 3772 | #define NL80211_ATTR_CSA_C_OFF_BEACON NL80211_ATTR_CNTDWN_OFFS_BEACON |
| 3771 | #define NL80211_ATTR_CSA_C_OFF_PRESP NL80211_ATTR_CNTDWN_OFFS_PRESP | 3773 | #define NL80211_ATTR_CSA_C_OFF_PRESP NL80211_ATTR_CNTDWN_OFFS_PRESP |
| 3774 | #define NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS NL80211_ATTR_EXT_MLD_CAPA_AND_OPS | ||
| 3772 | 3775 | ||
| 3773 | /* | 3776 | /* |
| 3774 | * Allow user space programs to use #ifdef on new attributes by defining them | 3777 | * Allow user space programs to use #ifdef on new attributes by defining them |
| @@ -1061,7 +1061,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { · 1060 unmodified lines | |||
| 1061 | NL80211_MAX_SUPP_SELECTORS), | 1061 | NL80211_MAX_SUPP_SELECTORS), |
| 1062 | [NL80211_ATTR_MLO_RECONF_REM_LINKS] = { .type = NLA_U16 }, | 1062 | [NL80211_ATTR_MLO_RECONF_REM_LINKS] = { .type = NLA_U16 }, |
| 1063 | [NL80211_ATTR_EPCS] = { .type = NLA_FLAG }, | 1063 | [NL80211_ATTR_EPCS] = { .type = NLA_FLAG }, |
| 1064 | [NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS] = { .type = NLA_U16 }, | 1064 | [NL80211_ATTR_EXT_MLD_CAPA_AND_OPS] = { .type = NLA_U16 }, |
| 1065 | [NL80211_ATTR_WIPHY_RADIO_INDEX] = { .type = NLA_U8 }, | 1065 | [NL80211_ATTR_WIPHY_RADIO_INDEX] = { .type = NLA_U8 }, |
| 1066 | [NL80211_ATTR_S1G_LONG_BEACON_PERIOD] = NLA_POLICY_MIN(NLA_U8, 2), | 1066 | [NL80211_ATTR_S1G_LONG_BEACON_PERIOD] = NLA_POLICY_MIN(NLA_U8, 2), |
| 1067 | [NL80211_ATTR_S1G_SHORT_BEACON] = | 1067 | [NL80211_ATTR_S1G_SHORT_BEACON] = |
| @@ -3596,6 +3596,12 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · 2528 unmodified lines | |||
| 3596 | NL80211_ATTR_MLD_CAPA_AND_OPS, | 3596 | NL80211_ATTR_MLD_CAPA_AND_OPS, |
| 3597 | capab->mld_capa_and_ops))) | 3597 | capab->mld_capa_and_ops))) |
| 3598 | goto nla_put_failure; | 3598 | goto nla_put_failure; |
| 3599 | if (rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_MLO && | ||
| 3600 | capab->ext_mld_capa_and_ops && | ||
| 3601 | nla_put_u16(msg, | ||
| 3602 | NL80211_ATTR_EXT_MLD_CAPA_AND_OPS, | ||
| 3603 | capab->ext_mld_capa_and_ops)) | ||
| 3604 | goto nla_put_failure; | ||
| 3599 | 3605 | ||
| 3600 | nla_nest_end(msg, nested_ext_capab); | 3606 | nla_nest_end(msg, nested_ext_capab); |
| 3601 | if (state->split) | 3607 | if (state->split) |
| @@ -13059,9 +13065,9 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) · 9457 unmodified lines | |||
| 13059 | goto free; | 13065 | goto free; |
| 13060 | } | 13066 | } |
| 13061 | 13067 | ||
| 13062 | if (info->attrs[NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS]) | 13068 | if (info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS]) |
| 13063 | req.ext_mld_capa_ops = | 13069 | req.ext_mld_capa_ops = |
| 13064 | nla_get_u16(info->attrs[NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS]); | 13070 | nla_get_u16(info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS]); |
| 13065 | } else { | 13071 | } else { |
| 13066 | if (req.link_id >= 0) | 13072 | if (req.link_id >= 0) |
| 13067 | return -EINVAL; | 13073 | return -EINVAL; |
| @@ -13072,7 +13078,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) · 4 unmodified lines | |||
| 13072 | return PTR_ERR(req.bss); | 13078 | return PTR_ERR(req.bss); |
| 13073 | ap_addr = req.bss->bssid; | 13079 | ap_addr = req.bss->bssid; |
| 13074 | 13080 | ||
| 13075 | if (info->attrs[NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS]) | 13081 | if (info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS]) |
| 13076 | return -EINVAL; | 13082 | return -EINVAL; |
| 13077 | } | 13083 | } |
| 13078 | 13084 | ||
| @@ -19000,9 +19006,9 @@ static int nl80211_assoc_ml_reconf(struct sk_buff *skb, struct genl_info *info) · 5921 unmodified lines | |||
| 19000 | goto out; | 19006 | goto out; |
| 19001 | } | 19007 | } |
| 19002 | 19008 | ||
| 19003 | if (info->attrs[NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS]) | 19009 | if (info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS]) |
| 19004 | req.ext_mld_capa_ops = | 19010 | req.ext_mld_capa_ops = |
| 19005 | nla_get_u16(info->attrs[NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS]); | 19011 | nla_get_u16(info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS]); |
| 19006 | 19012 | ||
| 19007 | err = cfg80211_assoc_ml_reconf(rdev, dev, &req); | 19013 | err = cfg80211_assoc_ml_reconf(rdev, dev, &req); |
| 19008 | 19014 | ||