wifi: nl80211: permit userspace to pass supported selectors

Currently the SAE_H2E selector already exists, which needs to be
implemented by the SME. As new such selectors might be added in the
future, add a feature to permit userspace to report a selector as
supported.

If not given, the kernel should assume that userspace does support
SAE_H2E.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250101070249.fe67b871cc39.Ieb98390328927e998e612345a58b6dbc00b0e3a2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Benjamin Berg
2025-01-01 07:05:35 +02:00
committed by Johannes Berg
parent 931cf025cc
commit f6d2e5abf1
3 changed files with 53 additions and 0 deletions

View File

@@ -2871,6 +2871,12 @@ enum nl80211_commands {
* @NL80211_ATTR_VIF_RADIO_MASK: Bitmask of allowed radios (u32).
* A value of 0 means all radios.
*
* @NL80211_ATTR_SUPPORTED_SELECTORS: supported selectors, array of
* supported selectors as defined by IEEE 802.11 7.3.2.2 but without the
* length restriction (at most %NL80211_MAX_SUPP_SELECTORS).
* This can be used to provide a list of selectors that are implemented
* by the supplicant. If not given, support for SAE_H2E is assumed.
*
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3421,6 +3427,8 @@ enum nl80211_attrs {
NL80211_ATTR_VIF_RADIO_MASK,
NL80211_ATTR_SUPPORTED_SELECTORS,
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -3465,6 +3473,7 @@ enum nl80211_attrs {
#define NL80211_WIPHY_NAME_MAXLEN 64
#define NL80211_MAX_SUPP_RATES 32
#define NL80211_MAX_SUPP_SELECTORS 128
#define NL80211_MAX_SUPP_HT_RATES 77
#define NL80211_MAX_SUPP_REG_RULES 128
#define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0