diff options
author | Avraham Stern <avraham.stern@intel.com> | 2017-06-09 14:08:43 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-06-13 10:44:09 +0200 |
commit | 3a00df5707b6af715e78c26569800e0c2eb615fe (patch) | |
tree | fa4d6f08302a8a4eda8ebfc3854096e13fef23f4 /net/wireless/core.c | |
parent | cfg80211: support 4-way handshake offloading for WPA/WPA2-PSK (diff) | |
download | linux-3a00df5707b6af715e78c26569800e0c2eb615fe.tar.xz linux-3a00df5707b6af715e78c26569800e0c2eb615fe.zip |
cfg80211: support 4-way handshake offloading for 802.1X
Add API for setting the PMK to the driver. For FT support, allow
setting also the PMK-R0 Name.
This can be used by drivers that support 4-Way handshake offload
while IEEE802.1X authentication is managed by upper layers.
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[arend.vanspriel@broadcom.com: add WANT_1X_4WAY_HS attribute]
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
[reword NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X docs a bit to
say that the device may require it]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 83ea164f16b3..7b33e8c366bc 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -711,6 +711,11 @@ int wiphy_register(struct wiphy *wiphy) (wiphy->bss_select_support & ~(BIT(__NL80211_BSS_SELECT_ATTR_AFTER_LAST) - 2)))) return -EINVAL; + if (WARN_ON(wiphy_ext_feature_isset(&rdev->wiphy, + NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X) && + (!rdev->ops->set_pmk || !rdev->ops->del_pmk))) + return -EINVAL; + if (wiphy->addresses) memcpy(wiphy->perm_addr, wiphy->addresses[0].addr, ETH_ALEN); |