diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-12-29 05:01:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:08:48 -0500 |
commit | d9e94d5647ee6700773d81514a8ccb7dc6342fb4 (patch) | |
tree | 826132c6f2da28b253d9f94c3da8075bffa19640 /net/ieee80211/ieee80211_crypt_tkip.c | |
parent | c414e84b2200ca8a7e7ae565cad200e5c02e02ec (diff) |
ieee80211: fix misannotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/ieee80211/ieee80211_crypt_tkip.c')
-rw-r--r-- | net/ieee80211/ieee80211_crypt_tkip.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/net/ieee80211/ieee80211_crypt_tkip.c b/net/ieee80211/ieee80211_crypt_tkip.c index 8e146949fc6f..bba0152e2d71 100644 --- a/net/ieee80211/ieee80211_crypt_tkip.c +++ b/net/ieee80211/ieee80211_crypt_tkip.c | |||
@@ -189,7 +189,7 @@ static inline u16 Mk16(u8 hi, u8 lo) | |||
189 | return lo | (((u16) hi) << 8); | 189 | return lo | (((u16) hi) << 8); |
190 | } | 190 | } |
191 | 191 | ||
192 | static inline u16 Mk16_le(u16 * v) | 192 | static inline u16 Mk16_le(__le16 * v) |
193 | { | 193 | { |
194 | return le16_to_cpu(*v); | 194 | return le16_to_cpu(*v); |
195 | } | 195 | } |
@@ -275,15 +275,15 @@ static void tkip_mixing_phase2(u8 * WEPSeed, const u8 * TK, const u16 * TTAK, | |||
275 | PPK[5] = TTAK[4] + IV16; | 275 | PPK[5] = TTAK[4] + IV16; |
276 | 276 | ||
277 | /* Step 2 - 96-bit bijective mixing using S-box */ | 277 | /* Step 2 - 96-bit bijective mixing using S-box */ |
278 | PPK[0] += _S_(PPK[5] ^ Mk16_le((u16 *) & TK[0])); | 278 | PPK[0] += _S_(PPK[5] ^ Mk16_le((__le16 *) & TK[0])); |
279 | PPK[1] += _S_(PPK[0] ^ Mk16_le((u16 *) & TK[2])); | 279 | PPK[1] += _S_(PPK[0] ^ Mk16_le((__le16 *) & TK[2])); |
280 | PPK[2] += _S_(PPK[1] ^ Mk16_le((u16 *) & TK[4])); | 280 | PPK[2] += _S_(PPK[1] ^ Mk16_le((__le16 *) & TK[4])); |
281 | PPK[3] += _S_(PPK[2] ^ Mk16_le((u16 *) & TK[6])); | 281 | PPK[3] += _S_(PPK[2] ^ Mk16_le((__le16 *) & TK[6])); |
282 | PPK[4] += _S_(PPK[3] ^ Mk16_le((u16 *) & TK[8])); | 282 | PPK[4] += _S_(PPK[3] ^ Mk16_le((__le16 *) & TK[8])); |
283 | PPK[5] += _S_(PPK[4] ^ Mk16_le((u16 *) & TK[10])); | 283 | PPK[5] += _S_(PPK[4] ^ Mk16_le((__le16 *) & TK[10])); |
284 | 284 | ||
285 | PPK[0] += RotR1(PPK[5] ^ Mk16_le((u16 *) & TK[12])); | 285 | PPK[0] += RotR1(PPK[5] ^ Mk16_le((__le16 *) & TK[12])); |
286 | PPK[1] += RotR1(PPK[0] ^ Mk16_le((u16 *) & TK[14])); | 286 | PPK[1] += RotR1(PPK[0] ^ Mk16_le((__le16 *) & TK[14])); |
287 | PPK[2] += RotR1(PPK[1]); | 287 | PPK[2] += RotR1(PPK[1]); |
288 | PPK[3] += RotR1(PPK[2]); | 288 | PPK[3] += RotR1(PPK[2]); |
289 | PPK[4] += RotR1(PPK[3]); | 289 | PPK[4] += RotR1(PPK[3]); |
@@ -294,7 +294,7 @@ static void tkip_mixing_phase2(u8 * WEPSeed, const u8 * TK, const u16 * TTAK, | |||
294 | WEPSeed[0] = Hi8(IV16); | 294 | WEPSeed[0] = Hi8(IV16); |
295 | WEPSeed[1] = (Hi8(IV16) | 0x20) & 0x7F; | 295 | WEPSeed[1] = (Hi8(IV16) | 0x20) & 0x7F; |
296 | WEPSeed[2] = Lo8(IV16); | 296 | WEPSeed[2] = Lo8(IV16); |
297 | WEPSeed[3] = Lo8((PPK[5] ^ Mk16_le((u16 *) & TK[0])) >> 1); | 297 | WEPSeed[3] = Lo8((PPK[5] ^ Mk16_le((__le16 *) & TK[0])) >> 1); |
298 | 298 | ||
299 | #ifdef __BIG_ENDIAN | 299 | #ifdef __BIG_ENDIAN |
300 | { | 300 | { |