summaryrefslogtreecommitdiffstats
path: root/linux-2.4.x/include/linux/crc32.h
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2011-02-26 14:57:47 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2011-02-26 14:57:47 (GMT)
commitfaadb245e8e1d5c4245dbdacc201e85b47c0c1fb (patch)
tree725f1ac685590a82aa182776c0af40e6243cb8e6 /linux-2.4.x/include/linux/crc32.h
parentedb45850f53478c7779484105c30f8df0a3a3782 (diff)
downloadopenipcam-faadb245e8e1d5c4245dbdacc201e85b47c0c1fb.zip
openipcam-faadb245e8e1d5c4245dbdacc201e85b47c0c1fb.tar.gz
openipcam-faadb245e8e1d5c4245dbdacc201e85b47c0c1fb.tar.bz2
Applied mtd patches and updated lib/Config.lib to 2.6.24 +mtd
Diffstat (limited to 'linux-2.4.x/include/linux/crc32.h')
-rw-r--r--linux-2.4.x/include/linux/crc32.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/linux-2.4.x/include/linux/crc32.h b/linux-2.4.x/include/linux/crc32.h
index 0149736..9dd38cb 100644
--- a/linux-2.4.x/include/linux/crc32.h
+++ b/linux-2.4.x/include/linux/crc32.h
@@ -46,4 +46,25 @@ static inline u32 ether_crc(int length, unsigned char *data)
return crc;
}
-#endif /* _LINUX_CRC32_H */
+#ifndef CRC32_H
+#define CRC32_H
+
+/* $Id: crc32.h,v 1.5 2005/11/07 11:14:38 gleixner Exp $ */
+
+#include <linux/types.h>
+
+extern const uint32_t crc32_table[256];
+
+/* Return a 32-bit CRC of the contents of the buffer. */
+
+static inline uint32_t
+crc32(uint32_t val, const void *ss, int len)
+{
+ const unsigned char *s = ss;
+ while (--len >= 0)
+ val = crc32_table[(val ^ *s++) & 0xff] ^ (val >> 8);
+ return val;
+}
+
+#endif
+#endif