aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2009-06-18 18:21:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:42 -0400
commit2ab658f9ce218ae93b3d2db2b3fe68bfefb81196 (patch)
treea213342c59a3e7c5bbc7218d17e56264763fd221
parent51cd4aabd082144881644c308647ca501690b68c (diff)
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>
-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,
173 range->min_frag = 256; 173 range->min_frag = 256;
174 range->max_frag = 2346; 174 range->max_frag = 2346;
175 175
176 range->encoding_size[0] = 5;
177 range->encoding_size[1] = 13;
178 range->num_encoding_sizes = 2;
179 range->max_encoding_tokens = 4; 176 range->max_encoding_tokens = 4;
180 177
181 range->max_qual.updated = IW_QUAL_NOISE_INVALID; 178 range->max_qual.updated = IW_QUAL_NOISE_INVALID;
@@ -215,6 +212,16 @@ int cfg80211_wext_giwrange(struct net_device *dev,
215 case WLAN_CIPHER_SUITE_CCMP: 212 case WLAN_CIPHER_SUITE_CCMP:
216 range->enc_capa |= IW_ENC_CAPA_CIPHER_CCMP; 213 range->enc_capa |= IW_ENC_CAPA_CIPHER_CCMP;
217 break; 214 break;
215
216 case WLAN_CIPHER_SUITE_WEP40:
217 range->encoding_size[range->num_encoding_sizes++] =
218 WLAN_KEY_LEN_WEP40;
219 break;
220
221 case WLAN_CIPHER_SUITE_WEP104:
222 range->encoding_size[range->num_encoding_sizes++] =
223 WLAN_KEY_LEN_WEP104;
224 break;
218 } 225 }
219 } 226 }
220 227