diff options
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index beb226e78cd7..b94c8604ad7c 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -181,5 +181,20 @@ int cfg80211_validate_key_settings(struct key_params *params, int key_idx, | |||
181 | return -EINVAL; | 181 | return -EINVAL; |
182 | } | 182 | } |
183 | 183 | ||
184 | if (params->seq) { | ||
185 | switch (params->cipher) { | ||
186 | case WLAN_CIPHER_SUITE_WEP40: | ||
187 | case WLAN_CIPHER_SUITE_WEP104: | ||
188 | /* These ciphers do not use key sequence */ | ||
189 | return -EINVAL; | ||
190 | case WLAN_CIPHER_SUITE_TKIP: | ||
191 | case WLAN_CIPHER_SUITE_CCMP: | ||
192 | case WLAN_CIPHER_SUITE_AES_CMAC: | ||
193 | if (params->seq_len != 6) | ||
194 | return -EINVAL; | ||
195 | break; | ||
196 | } | ||
197 | } | ||
198 | |||
184 | return 0; | 199 | return 0; |
185 | } | 200 | } |