Move cipher to enum wpa_cipher conversion into wpa_common.c
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
cf830c1c54
commit
62769a88db
6 changed files with 28 additions and 26 deletions
|
@ -1132,6 +1132,26 @@ int wpa_cipher_to_alg(int cipher)
|
|||
}
|
||||
|
||||
|
||||
enum wpa_cipher wpa_cipher_to_suite_driver(int cipher)
|
||||
{
|
||||
switch (cipher) {
|
||||
case WPA_CIPHER_NONE:
|
||||
return CIPHER_NONE;
|
||||
case WPA_CIPHER_WEP40:
|
||||
return CIPHER_WEP40;
|
||||
case WPA_CIPHER_WEP104:
|
||||
return CIPHER_WEP104;
|
||||
case WPA_CIPHER_CCMP:
|
||||
return CIPHER_CCMP;
|
||||
case WPA_CIPHER_GCMP:
|
||||
return CIPHER_GCMP;
|
||||
case WPA_CIPHER_TKIP:
|
||||
default:
|
||||
return CIPHER_TKIP;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int wpa_cipher_valid_pairwise(int cipher)
|
||||
{
|
||||
return cipher == WPA_CIPHER_CCMP ||
|
||||
|
|
|
@ -392,6 +392,7 @@ int wpa_ft_parse_ies(const u8 *ies, size_t ies_len, struct wpa_ft_ies *parse);
|
|||
int wpa_cipher_key_len(int cipher);
|
||||
int wpa_cipher_rsc_len(int cipher);
|
||||
int wpa_cipher_to_alg(int cipher);
|
||||
enum wpa_cipher wpa_cipher_to_suite_driver(int cipher);
|
||||
int wpa_cipher_valid_pairwise(int cipher);
|
||||
u32 wpa_cipher_to_suite(int proto, int cipher);
|
||||
int rsn_cipher_put_suites(u8 *pos, int ciphers);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue