diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2015-01-24 12:52:05 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-27 05:04:57 -0500 |
commit | cfcf1682c4ca8f601a4702255958e0b1c9aa12cc (patch) | |
tree | f42bc2aa03961bc2e0bd101071864a237211e2d3 /net/wireless/util.c | |
parent | 37720569cc89205c23011d6b52f8c63ea2057c3d (diff) |
cfg80211: Add new GCMP, CCMP-256, BIP-GMAC, BIP-CMAC-256 ciphers
This makes cfg80211 aware of the GCMP, GCMP-256, CCMP-256, BIP-GMAC-128,
BIP-GMAC-256, and BIP-CMAC-256 cipher suites. These new cipher suites
were defined in IEEE Std 802.11ac-2013.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 08f136ad2ea5..919fee807dd9 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -230,6 +230,9 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev, | |||
230 | switch (params->cipher) { | 230 | switch (params->cipher) { |
231 | case WLAN_CIPHER_SUITE_TKIP: | 231 | case WLAN_CIPHER_SUITE_TKIP: |
232 | case WLAN_CIPHER_SUITE_CCMP: | 232 | case WLAN_CIPHER_SUITE_CCMP: |
233 | case WLAN_CIPHER_SUITE_CCMP_256: | ||
234 | case WLAN_CIPHER_SUITE_GCMP: | ||
235 | case WLAN_CIPHER_SUITE_GCMP_256: | ||
233 | /* Disallow pairwise keys with non-zero index unless it's WEP | 236 | /* Disallow pairwise keys with non-zero index unless it's WEP |
234 | * or a vendor specific cipher (because current deployments use | 237 | * or a vendor specific cipher (because current deployments use |
235 | * pairwise WEP keys with non-zero indices and for vendor | 238 | * pairwise WEP keys with non-zero indices and for vendor |
@@ -240,6 +243,9 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev, | |||
240 | return -EINVAL; | 243 | return -EINVAL; |
241 | break; | 244 | break; |
242 | case WLAN_CIPHER_SUITE_AES_CMAC: | 245 | case WLAN_CIPHER_SUITE_AES_CMAC: |
246 | case WLAN_CIPHER_SUITE_BIP_CMAC_256: | ||
247 | case WLAN_CIPHER_SUITE_BIP_GMAC_128: | ||
248 | case WLAN_CIPHER_SUITE_BIP_GMAC_256: | ||
243 | /* Disallow BIP (group-only) cipher as pairwise cipher */ | 249 | /* Disallow BIP (group-only) cipher as pairwise cipher */ |
244 | if (pairwise) | 250 | if (pairwise) |
245 | return -EINVAL; | 251 | return -EINVAL; |
@@ -261,6 +267,18 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev, | |||
261 | if (params->key_len != WLAN_KEY_LEN_CCMP) | 267 | if (params->key_len != WLAN_KEY_LEN_CCMP) |
262 | return -EINVAL; | 268 | return -EINVAL; |
263 | break; | 269 | break; |
270 | case WLAN_CIPHER_SUITE_CCMP_256: | ||
271 | if (params->key_len != WLAN_KEY_LEN_CCMP_256) | ||
272 | return -EINVAL; | ||
273 | break; | ||
274 | case WLAN_CIPHER_SUITE_GCMP: | ||
275 | if (params->key_len != WLAN_KEY_LEN_GCMP) | ||
276 | return -EINVAL; | ||
277 | break; | ||
278 | case WLAN_CIPHER_SUITE_GCMP_256: | ||
279 | if (params->key_len != WLAN_KEY_LEN_GCMP_256) | ||
280 | return -EINVAL; | ||
281 | break; | ||
264 | case WLAN_CIPHER_SUITE_WEP104: | 282 | case WLAN_CIPHER_SUITE_WEP104: |
265 | if (params->key_len != WLAN_KEY_LEN_WEP104) | 283 | if (params->key_len != WLAN_KEY_LEN_WEP104) |
266 | return -EINVAL; | 284 | return -EINVAL; |
@@ -269,6 +287,18 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev, | |||
269 | if (params->key_len != WLAN_KEY_LEN_AES_CMAC) | 287 | if (params->key_len != WLAN_KEY_LEN_AES_CMAC) |
270 | return -EINVAL; | 288 | return -EINVAL; |
271 | break; | 289 | break; |
290 | case WLAN_CIPHER_SUITE_BIP_CMAC_256: | ||
291 | if (params->key_len != WLAN_KEY_LEN_BIP_CMAC_256) | ||
292 | return -EINVAL; | ||
293 | break; | ||
294 | case WLAN_CIPHER_SUITE_BIP_GMAC_128: | ||
295 | if (params->key_len != WLAN_KEY_LEN_BIP_GMAC_128) | ||
296 | return -EINVAL; | ||
297 | break; | ||
298 | case WLAN_CIPHER_SUITE_BIP_GMAC_256: | ||
299 | if (params->key_len != WLAN_KEY_LEN_BIP_GMAC_256) | ||
300 | return -EINVAL; | ||
301 | break; | ||
272 | default: | 302 | default: |
273 | /* | 303 | /* |
274 | * We don't know anything about this algorithm, | 304 | * We don't know anything about this algorithm, |
@@ -288,7 +318,13 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev, | |||
288 | return -EINVAL; | 318 | return -EINVAL; |
289 | case WLAN_CIPHER_SUITE_TKIP: | 319 | case WLAN_CIPHER_SUITE_TKIP: |
290 | case WLAN_CIPHER_SUITE_CCMP: | 320 | case WLAN_CIPHER_SUITE_CCMP: |
321 | case WLAN_CIPHER_SUITE_CCMP_256: | ||
322 | case WLAN_CIPHER_SUITE_GCMP: | ||
323 | case WLAN_CIPHER_SUITE_GCMP_256: | ||
291 | case WLAN_CIPHER_SUITE_AES_CMAC: | 324 | case WLAN_CIPHER_SUITE_AES_CMAC: |
325 | case WLAN_CIPHER_SUITE_BIP_CMAC_256: | ||
326 | case WLAN_CIPHER_SUITE_BIP_GMAC_128: | ||
327 | case WLAN_CIPHER_SUITE_BIP_GMAC_256: | ||
292 | if (params->seq_len != 6) | 328 | if (params->seq_len != 6) |
293 | return -EINVAL; | 329 | return -EINVAL; |
294 | break; | 330 | break; |