summaryrefslogtreecommitdiffstats
path: root/net/wireless/wext-compat.c
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2009-06-18 23:21:16 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:42 -0400
commit2ab658f9ce218ae93b3d2db2b3fe68bfefb81196 (patch)
treea213342c59a3e7c5bbc7218d17e56264763fd221 /net/wireless/wext-compat.c
parent51cd4aabd082144881644c308647ca501690b68c (diff)
downloadtalos-obmc-linux-2ab658f9ce218ae93b3d2db2b3fe68bfefb81196.tar.gz
talos-obmc-linux-2ab658f9ce218ae93b3d2db2b3fe68bfefb81196.zip
cfg80211: set WE encoding size based on available ciphers
Only set the sizes for WEP40 and WEP104. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/wext-compat.c')
-rw-r--r--net/wireless/wext-compat.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index bb97061219ca..2f7e7760bc7e 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -173,9 +173,6 @@ int cfg80211_wext_giwrange(struct net_device *dev,
range->min_frag = 256;
range->max_frag = 2346;
- range->encoding_size[0] = 5;
- range->encoding_size[1] = 13;
- range->num_encoding_sizes = 2;
range->max_encoding_tokens = 4;
range->max_qual.updated = IW_QUAL_NOISE_INVALID;
@@ -215,6 +212,16 @@ int cfg80211_wext_giwrange(struct net_device *dev,
case WLAN_CIPHER_SUITE_CCMP:
range->enc_capa |= IW_ENC_CAPA_CIPHER_CCMP;
break;
+
+ case WLAN_CIPHER_SUITE_WEP40:
+ range->encoding_size[range->num_encoding_sizes++] =
+ WLAN_KEY_LEN_WEP40;
+ break;
+
+ case WLAN_CIPHER_SUITE_WEP104:
+ range->encoding_size[range->num_encoding_sizes++] =
+ WLAN_KEY_LEN_WEP104;
+ break;
}
}
OpenPOWER on IntegriCloud