On 1/17/2020 12:35 PM, Veerendranath Jakkam wrote:
Commit ab4dfa20534e ("cfg80211: Allow drivers to advertise supported AKM
suites") introduces the support to advertize supported AKMs to userspace.
This needs an enhancement to advertize the AKM support per interface type,
specifically for the cfg80211-based drivers that implement SME and use
different mechanisms to support the AKM's for each interface type (e.g.,
the support for SAE, OWE AKM's take different paths for such drivers on
STA/AP mode).
Add a new nl80211 attribute to provide supported AKMs per interface type
to userspace.
This commit aims the same and enhances the earlier mechanism of advertizing
the AKMs per wiphy. AKMs advertized in akm_suites are default capabilities
if not advertized for a specific interface type in iftype_akm_suites.
Signed-off-by: Veerendranath Jakkam <vjakkam@xxxxxxxxxxxxxx>
---
Changelog:
v1->v2:
-Keep advertizing support for AKM suites per wiphy
-AKM suites per interface overrides wiphy AKM suites for specific interface
-Rename new nl80211 attribute to NL80211_ATTR_IFTYPE_AKM_SUITES
---
include/net/cfg80211.h | 22 +++++++++++++++++++-
include/uapi/linux/nl80211.h | 6 ++++++
net/wireless/nl80211.c | 39 ++++++++++++++++++++++++++++++++++++
3 files changed, 66 insertions(+), 1 deletion(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index fa027d0d031b..10533dff2102 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4398,6 +4398,18 @@ struct cfg80211_pmsr_capabilities {
} ftm;
};
+/**
+ * struct wiphy_iftype_akm_suites - supported akm suites per interface type
+ * @iftype: interface type
+ * @akm_suites: points to an array of supported akm suites
+ * @n_akm_suites: number of supported AKM suites
+ */
+struct wiphy_iftype_akm_suites {
+ enum nl80211_iftype iftype;
I can imagine certain iftypes could support same suites so maybe good to
use bitmask of iftypes iso single iftype.
Regards,
Arend
+ const u32 *akm_suites;
+ int n_akm_suites;
+};
+