aboutsummaryrefslogtreecommitdiff
path: root/net/wireless/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r--net/wireless/util.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index d072bff463a..25550692dda 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -157,26 +157,25 @@ int cfg80211_validate_key_settings(struct key_params *params, int key_idx,
params->cipher != WLAN_CIPHER_SUITE_WEP104)
return -EINVAL;
- /* TODO: add definitions for the lengths to linux/ieee80211.h */
switch (params->cipher) {
case WLAN_CIPHER_SUITE_WEP40:
- if (params->key_len != 5)
+ if (params->key_len != WLAN_KEY_LEN_WEP40)
return -EINVAL;
break;
case WLAN_CIPHER_SUITE_TKIP:
- if (params->key_len != 32)
+ if (params->key_len != WLAN_KEY_LEN_TKIP)
return -EINVAL;
break;
case WLAN_CIPHER_SUITE_CCMP:
- if (params->key_len != 16)
+ if (params->key_len != WLAN_KEY_LEN_CCMP)
return -EINVAL;
break;
case WLAN_CIPHER_SUITE_WEP104:
- if (params->key_len != 13)
+ if (params->key_len != WLAN_KEY_LEN_WEP104)
return -EINVAL;
break;
case WLAN_CIPHER_SUITE_AES_CMAC:
- if (params->key_len != 16)
+ if (params->key_len != WLAN_KEY_LEN_AES_CMAC)
return -EINVAL;
break;
default:
@@ -259,7 +258,7 @@ unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb)
}
EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb);
-int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr)
+static int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr)
{
int ae = meshhdr->flags & MESH_FLAGS_AE;
/* 7.1.3.5a.2 */