|
@@ -4126,12 +4126,6 @@ static bool nl80211_valid_wpa_versions(u32 wpa_versions)
|
|
NL80211_WPA_VERSION_2));
|
|
NL80211_WPA_VERSION_2));
|
|
}
|
|
}
|
|
|
|
|
|
-static bool nl80211_valid_akm_suite(u32 akm)
|
|
|
|
-{
|
|
|
|
- return akm == WLAN_AKM_SUITE_8021X ||
|
|
|
|
- akm == WLAN_AKM_SUITE_PSK;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static bool nl80211_valid_cipher_suite(u32 cipher)
|
|
static bool nl80211_valid_cipher_suite(u32 cipher)
|
|
{
|
|
{
|
|
return cipher == WLAN_CIPHER_SUITE_WEP40 ||
|
|
return cipher == WLAN_CIPHER_SUITE_WEP40 ||
|
|
@@ -4295,7 +4289,7 @@ static int nl80211_crypto_settings(struct cfg80211_registered_device *rdev,
|
|
|
|
|
|
if (info->attrs[NL80211_ATTR_AKM_SUITES]) {
|
|
if (info->attrs[NL80211_ATTR_AKM_SUITES]) {
|
|
void *data;
|
|
void *data;
|
|
- int len, i;
|
|
|
|
|
|
+ int len;
|
|
|
|
|
|
data = nla_data(info->attrs[NL80211_ATTR_AKM_SUITES]);
|
|
data = nla_data(info->attrs[NL80211_ATTR_AKM_SUITES]);
|
|
len = nla_len(info->attrs[NL80211_ATTR_AKM_SUITES]);
|
|
len = nla_len(info->attrs[NL80211_ATTR_AKM_SUITES]);
|
|
@@ -4305,10 +4299,6 @@ static int nl80211_crypto_settings(struct cfg80211_registered_device *rdev,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
memcpy(settings->akm_suites, data, len);
|
|
memcpy(settings->akm_suites, data, len);
|
|
-
|
|
|
|
- for (i = 0; i < settings->n_ciphers_pairwise; i++)
|
|
|
|
- if (!nl80211_valid_akm_suite(settings->akm_suites[i]))
|
|
|
|
- return -EINVAL;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
return 0;
|
|
return 0;
|