summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/ath
diff options
context:
space:
mode:
authorMichael Brown2017-03-10 16:40:17 +0100
committerMichael Brown2017-03-10 16:44:11 +0100
commitafdebdc163268bfc31d927cdfbbf92ed1aa93a6f (patch)
tree20ed64d9db9b9f356137daf73a87538edebc3b7a /src/drivers/net/ath
parent[iscsi] Don't close when receiving NOP-In (diff)
downloadipxe-afdebdc163268bfc31d927cdfbbf92ed1aa93a6f.tar.gz
ipxe-afdebdc163268bfc31d927cdfbbf92ed1aa93a6f.tar.xz
ipxe-afdebdc163268bfc31d927cdfbbf92ed1aa93a6f.zip
[build] Provide common ARRAY_SIZE() definition
Several files define the ARRAY_SIZE() macro as used in Linux. Provide a common definition for this in include/compiler.h. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/ath')
-rw-r--r--src/drivers/net/ath/ath.h1
-rw-r--r--src/drivers/net/ath/ath5k/ath5k.h2
2 files changed, 0 insertions, 3 deletions
diff --git a/src/drivers/net/ath/ath.h b/src/drivers/net/ath/ath.h
index d6a03739..589bb563 100644
--- a/src/drivers/net/ath/ath.h
+++ b/src/drivers/net/ath/ath.h
@@ -26,7 +26,6 @@ FILE_LICENCE ( BSD2 );
#include <ipxe/net80211.h>
/* This block of functions are from kernel.h v3.0.1 */
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define BITS_PER_BYTE 8
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
diff --git a/src/drivers/net/ath/ath5k/ath5k.h b/src/drivers/net/ath/ath5k/ath5k.h
index 30e2024c..fa62e8ce 100644
--- a/src/drivers/net/ath/ath5k/ath5k.h
+++ b/src/drivers/net/ath/ath5k/ath5k.h
@@ -34,8 +34,6 @@ FILE_LICENCE ( MIT );
#undef ERRFILE
#define ERRFILE ERRFILE_ath5k
-#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
-
/* RX/TX descriptor hw structs */
#include "desc.h"