summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2003-01-04 00:34:57 -0600
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2003-01-04 00:34:57 -0600
commit05cb64babb37896457bfc536f4be8cd554397934 (patch)
treecb9dbeca4f4959d0dc18b512ccc0e479b9cd5710 /include/linux
parent50765282537396cd810f9f80318ac734d24bf304 (diff)
parent6b4e1e926ae0ee936914e4fd729382af433938fb (diff)
Merge tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5
into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.isdn
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/compat.h3
-rw-r--r--include/linux/crc32.h12
2 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 3f634baef539..39405f5a06ea 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -10,6 +10,7 @@
#include <linux/stat.h>
#include <linux/param.h> /* for HZ */
+#include <linux/fcntl.h> /* for struct flock */
#include <asm/compat.h>
#define compat_jiffies_to_clock_t(x) \
@@ -33,6 +34,8 @@ struct compat_tms {
};
extern int cp_compat_stat(struct kstat *, struct compat_stat *);
+extern int get_compat_flock(struct flock *, struct compat_flock *);
+extern int put_compat_flock(struct flock *, struct compat_flock *);
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */
diff --git a/include/linux/crc32.h b/include/linux/crc32.h
index a0033ffee91c..56c0645789a9 100644
--- a/include/linux/crc32.h
+++ b/include/linux/crc32.h
@@ -9,9 +9,19 @@
extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len);
extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len);
+extern u32 bitreverse(u32 in);
#define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)data, length)
+
+/*
+ * Helpers for hash table generation of ethernet nics:
+ *
+ * Ethernet sends the least significant bit of a byte first, thus crc32_le
+ * is used. The output of crc32_le is bit reversed [most significant bit
+ * is in bit nr 0], thus it must be reversed before use. Except for
+ * nics that bit swap the result internally...
+ */
+#define ether_crc(length, data) bitreverse(crc32_le(~0, data, length))
#define ether_crc_le(length, data) crc32_le(~0, data, length)
-#define ether_crc(length, data) crc32_be(~0, data, length)
#endif /* _LINUX_CRC32_H */