wifi: cfg80211: Increase akm_suites array size in

cfg80211_crypto_settings

Increase akm_suites array size in struct cfg80211_crypto_settings to 10
and advertise the capability to userspace. This allows userspace to send
more than two AKMs to driver in netlink commands such as
NL80211_CMD_CONNECT.

This capability is needed for implementing WPA3-Personal transition mode
correctly with any driver that handles roaming internally. Currently,
the possible AKMs for multi-AKM connect can include PSK, PSK-SHA-256,
SAE, FT-PSK and FT-SAE. Since the count is already 5, increasing
the akm_suites array size to 10 should be reasonable for future
usecases.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Link:
https://lore.kernel.org/r/1653312358-12321-1-git-send-email-quic_vjakkam@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Git-commit: ecad3b0b99bff7247a11f8c7cb19ac9b0cb28b09
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git.

Change-Id: I4ce3de12ec85e11cf30d0b26e2324bc62ab5e73e
CRs-Fixed: 3799177
Signed-off-by: Srikanth Marepalli <quic_srimarep@quicinc.com>
This commit is contained in:
Srikanth Marepalli 2024-05-06 18:08:26 +05:30 • committed by Sumangala P
commit 525fb1b48f
5 changed files with 45 additions and 6 deletions

View file

@ -2465,6 +2465,13 @@ enum nl80211_commands {
* @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element (from
* association request when used with NL80211_CMD_NEW_STATION).
*
* @NL80211_ATTR_MAX_NUM_AKM_SUITES: U16 attribute. Indicates maximum number of
* AKM suites allowed for %NL80211_CMD_CONNECT, %NL80211_CMD_ASSOCIATE and
* %NL80211_CMD_START_AP in %NL80211_CMD_GET_WIPHY response. If this
* attribute is not present userspace shall consider maximum number of AKM
* suites allowed as %NL80211_MAX_NR_AKM_SUITES which is the legacy maximum
* number prior to the introduction of this attribute.
*
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@ -2942,6 +2949,8 @@ enum nl80211_attrs {
NL80211_ATTR_HE_6GHZ_CAPABILITY,
NL80211_ATTR_MAX_NUM_AKM_SUITES = 316,
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@ -2994,6 +3003,11 @@ enum nl80211_attrs {
#define NL80211_HE_MIN_CAPABILITY_LEN 16
#define NL80211_HE_MAX_CAPABILITY_LEN 54
#define NL80211_MAX_NR_CIPHER_SUITES 5
/*
* NL80211_MAX_NR_AKM_SUITES is obsolete when %NL80211_ATTR_MAX_NUM_AKM_SUITES
* present in %NL80211_CMD_GET_WIPHY response.
*/
#define NL80211_MAX_NR_AKM_SUITES 2
#define NL80211_MIN_REMAIN_ON_CHANNEL_TIME 10