aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/airo.c4
-rw-r--r--drivers/net/wireless/prism54/oid_mgt.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 44a22701da97..4ad910b1b69a 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,
1623 1623
1624 crypto_cipher_setkey(tfm, pkey, 16); 1624 crypto_cipher_setkey(tfm, pkey, 16);
1625 counter = 0; 1625 counter = 0;
1626 for (i = 0; i < (sizeof(context->coeff)/sizeof(context->coeff[0])); ) { 1626 for (i = 0; i < ARRAY_SIZE(context->coeff); ) {
1627 aes_counter[15] = (u8)(counter >> 0); 1627 aes_counter[15] = (u8)(counter >> 0);
1628 aes_counter[14] = (u8)(counter >> 8); 1628 aes_counter[14] = (u8)(counter >> 8);
1629 aes_counter[13] = (u8)(counter >> 16); 1629 aes_counter[13] = (u8)(counter >> 16);
@@ -1632,7 +1632,7 @@ static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen,
1632 memcpy (plain, aes_counter, 16); 1632 memcpy (plain, aes_counter, 16);
1633 crypto_cipher_encrypt_one(tfm, plain, plain); 1633 crypto_cipher_encrypt_one(tfm, plain, plain);
1634 cipher = plain; 1634 cipher = plain;
1635 for (j=0; (j<16) && (i< (sizeof(context->coeff)/sizeof(context->coeff[0]))); ) { 1635 for (j = 0; (j < 16) && (i < ARRAY_SIZE(context->coeff)); ) {
1636 context->coeff[i++] = ntohl(*(u32 *)&cipher[j]); 1636 context->coeff[i++] = ntohl(*(u32 *)&cipher[j]);
1637 j += 4; 1637 j += 4;
1638 } 1638 }
diff --git a/drivers/net/wireless/prism54/oid_mgt.c b/drivers/net/wireless/prism54/oid_mgt.c
index e6cf9df2c206..42780320cd5c 100644
--- a/drivers/net/wireless/prism54/oid_mgt.c
+++ b/drivers/net/wireless/prism54/oid_mgt.c
@@ -16,6 +16,8 @@
16 * 16 *
17 */ 17 */
18 18
19#include <linux/kernel.h>
20
19#include "prismcompat.h" 21#include "prismcompat.h"
20#include "islpci_dev.h" 22#include "islpci_dev.h"
21#include "islpci_mgt.h" 23#include "islpci_mgt.h"
@@ -692,7 +694,7 @@ mgt_update_addr(islpci_private *priv)
692 return ret; 694 return ret;
693} 695}
694 696
695#define VEC_SIZE(a) (sizeof(a)/sizeof(a[0])) 697#define VEC_SIZE(a) ARRAY_SIZE(a)
696 698
697int 699int
698mgt_commit(islpci_private *priv) 700mgt_commit(islpci_private *priv)