summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-02-20 11:28:42 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-20 11:28:42 -0500
commit6606e17a7f1c3bc1b1e83d0c517f11d094e55bf1 (patch)
tree83f20d0d3c12d9db75fdfc74454d781d2e4ea590 /drivers/net/wireless/airo.c
parent6aab44475a1355365f0a24abe6f8eb32185a701e (diff)
parentb312362be6d9155b66f3a26d9159e0a680fbd6c5 (diff)
Merge branch 'upstream-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r--drivers/net/wireless/airo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index b08055abe83..a8c2bfe26c2 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -1623,7 +1623,7 @@ static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen,
crypto_cipher_setkey(tfm, pkey, 16);
counter = 0;
- for (i = 0; i < (sizeof(context->coeff)/sizeof(context->coeff[0])); ) {
+ for (i = 0; i < ARRAY_SIZE(context->coeff); ) {
aes_counter[15] = (u8)(counter >> 0);
aes_counter[14] = (u8)(counter >> 8);
aes_counter[13] = (u8)(counter >> 16);
@@ -1632,7 +1632,7 @@ static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen,
memcpy (plain, aes_counter, 16);
crypto_cipher_encrypt_one(tfm, plain, plain);
cipher = plain;
- for (j=0; (j<16) && (i< (sizeof(context->coeff)/sizeof(context->coeff[0]))); ) {
+ for (j = 0; (j < 16) && (i < ARRAY_SIZE(context->coeff)); ) {
context->coeff[i++] = ntohl(*(u32 *)&cipher[j]);
j += 4;
}