aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2011-01-25 05:21:22 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-28 15:44:27 -0500
commit45cbad6a1299842b5ae9a8a9c09630af063692f8 (patch)
tree153e05300a1a6cee014441e0d4733165a1f60f37 /net/wireless
parent53e3b6e29eeda568fbe6c1e32d35cb56eea94415 (diff)
cfg80211: Allow non-zero indexes for device specific pair-wise ciphers
Some vendor specific cipher suites require non-zero key indexes for pairwise keys, but as of currently, the cfg80211 does not allow it. As validating they cipher parameters for vendor specific cipher suites is the job of the driver or hardware/firmware, change the cfg80211 to allow also non-zero pairwise key indexes for vendor specific ciphers. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/util.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 4ed065d8bb51..6a750bc6bcfe 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -167,12 +167,15 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev,
167 167
168 /* 168 /*
169 * Disallow pairwise keys with non-zero index unless it's WEP 169 * Disallow pairwise keys with non-zero index unless it's WEP
170 * (because current deployments use pairwise WEP keys with 170 * or a vendor specific cipher (because current deployments use
171 * non-zero indizes but 802.11i clearly specifies to use zero) 171 * pairwise WEP keys with non-zero indices and for vendor specific
172 * ciphers this should be validated in the driver or hardware level
173 * - but 802.11i clearly specifies to use zero)
172 */ 174 */
173 if (pairwise && key_idx && 175 if (pairwise && key_idx &&
174 params->cipher != WLAN_CIPHER_SUITE_WEP40 && 176 ((params->cipher == WLAN_CIPHER_SUITE_TKIP) ||
175 params->cipher != WLAN_CIPHER_SUITE_WEP104) 177 (params->cipher == WLAN_CIPHER_SUITE_CCMP) ||
178 (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC)))
176 return -EINVAL; 179 return -EINVAL;
177 180
178 switch (params->cipher) { 181 switch (params->cipher) {