cfg80211: Allow drivers to advertise supported AKM suites
There was no such capability advertisement from the driver and thus the current user space has to assume the driver to support all the AKMs. While that may be the case with some drivers (e.g., mac80211-based ones), there are cfg80211-based drivers that implement SME and have constraints on which AKMs can be supported (e.g., such drivers may need an update to support SAE AKM using NL80211_CMD_EXTERNAL_AUTH). Allow such drivers to advertise the exact set of supported AKMs so that user space tools can determine what network profile options should be allowed to be configured. Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org> [pmsr data might be big, start a new netlink message section] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
c82c06ce43
commit
ab4dfa2053
|
@ -4128,6 +4128,8 @@ struct cfg80211_pmsr_capabilities {
|
||||||
* @signal_type: signal type reported in &struct cfg80211_bss.
|
* @signal_type: signal type reported in &struct cfg80211_bss.
|
||||||
* @cipher_suites: supported cipher suites
|
* @cipher_suites: supported cipher suites
|
||||||
* @n_cipher_suites: number of supported cipher suites
|
* @n_cipher_suites: number of supported cipher suites
|
||||||
|
* @akm_suites: supported AKM suites
|
||||||
|
* @n_akm_suites: number of supported AKM suites
|
||||||
* @retry_short: Retry limit for short frames (dot11ShortRetryLimit)
|
* @retry_short: Retry limit for short frames (dot11ShortRetryLimit)
|
||||||
* @retry_long: Retry limit for long frames (dot11LongRetryLimit)
|
* @retry_long: Retry limit for long frames (dot11LongRetryLimit)
|
||||||
* @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold);
|
* @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold);
|
||||||
|
@ -4326,6 +4328,9 @@ struct wiphy {
|
||||||
int n_cipher_suites;
|
int n_cipher_suites;
|
||||||
const u32 *cipher_suites;
|
const u32 *cipher_suites;
|
||||||
|
|
||||||
|
int n_akm_suites;
|
||||||
|
const u32 *akm_suites;
|
||||||
|
|
||||||
u8 retry_short;
|
u8 retry_short;
|
||||||
u8 retry_long;
|
u8 retry_long;
|
||||||
u32 frag_threshold;
|
u32 frag_threshold;
|
||||||
|
|
|
@ -1565,6 +1565,12 @@ enum nl80211_commands {
|
||||||
* (a u32 with flags from &enum nl80211_wpa_versions).
|
* (a u32 with flags from &enum nl80211_wpa_versions).
|
||||||
* @NL80211_ATTR_AKM_SUITES: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
|
* @NL80211_ATTR_AKM_SUITES: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
|
||||||
* indicate which key management algorithm(s) to use (an array of u32).
|
* indicate which key management algorithm(s) to use (an array of u32).
|
||||||
|
* This attribute is also sent in response to @NL80211_CMD_GET_WIPHY,
|
||||||
|
* indicating the supported AKM suites, intended for specific drivers which
|
||||||
|
* implement SME and have constraints on which AKMs are supported and also
|
||||||
|
* the cases where an AKM support is offloaded to the driver/firmware.
|
||||||
|
* If there is no such notification from the driver, user space should
|
||||||
|
* assume the driver supports all the AKM suites.
|
||||||
*
|
*
|
||||||
* @NL80211_ATTR_REQ_IE: (Re)association request information elements as
|
* @NL80211_ATTR_REQ_IE: (Re)association request information elements as
|
||||||
* sent out by the card, for ROAM and successful CONNECT events.
|
* sent out by the card, for ROAM and successful CONNECT events.
|
||||||
|
|
|
@ -2279,6 +2279,15 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
|
||||||
if (nl80211_send_pmsr_capa(rdev, msg))
|
if (nl80211_send_pmsr_capa(rdev, msg))
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
|
|
||||||
|
state->split_start++;
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
if (rdev->wiphy.akm_suites &&
|
||||||
|
nla_put(msg, NL80211_ATTR_AKM_SUITES,
|
||||||
|
sizeof(u32) * rdev->wiphy.n_akm_suites,
|
||||||
|
rdev->wiphy.akm_suites))
|
||||||
|
goto nla_put_failure;
|
||||||
|
|
||||||
/* done */
|
/* done */
|
||||||
state->split_start = 0;
|
state->split_start = 0;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue