summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ar5212.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2005-06-17 12:51:09 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2005-06-17 12:51:09 +0000
commit98d299fb3163226547d144ab4bf2290abe7bf7c7 (patch)
tree9a8ed54ef721a757c63cf8c926f676977e154447 /sys/dev/ic/ar5212.c
parentf2f366716efad9da250389bf6f4ce3671d75b2b0 (diff)
remove non-constant array initializers which is a GNU extension.
suggested by anil some time ago.
Diffstat (limited to 'sys/dev/ic/ar5212.c')
-rw-r--r--sys/dev/ic/ar5212.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/ar5212.c b/sys/dev/ic/ar5212.c
index 611a363f3d5..2caf3f13470 100644
--- a/sys/dev/ic/ar5212.c
+++ b/sys/dev/ic/ar5212.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5212.c,v 1.21 2005/05/28 23:45:09 reyk Exp $ */
+/* $OpenBSD: ar5212.c,v 1.22 2005/06/17 12:51:08 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -2333,8 +2333,8 @@ ar5k_ar5212_set_key(hal, entry, keyval, mac, xor_notused)
const u_int8_t *mac;
int xor_notused;
{
- int elements = AR5K_AR5212_KEYCACHE_SIZE - 2, i;
- u_int32_t key_v[elements];
+ int i;
+ u_int32_t key_v[AR5K_AR5212_KEYCACHE_SIZE - 2];
AR5K_ASSERT_ENTRY(entry, AR5K_AR5212_KEYTABLE_SIZE);
@@ -2370,7 +2370,7 @@ ar5k_ar5212_set_key(hal, entry, keyval, mac, xor_notused)
return (AH_FALSE);
}
- for (i = 0; i < elements; i++)
+ for (i = 0; i < AR5K_ELEMENTS(key_v); i++)
AR5K_REG_WRITE(AR5K_AR5212_KEYTABLE_OFF(entry, i), key_v[i]);
return (ar5k_ar5212_set_key_lladdr(hal, entry, mac));