summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-10-16 08:36:58 +0000
committerMichael Hunold <devnull@localhost>2003-10-16 08:36:58 +0000
commit840ab7d279cb1b52ac095b757209fe4029606bfe (patch)
treee005a1bc63402664be3d9f77f4a2534cac9dc78a /linux/drivers/media
parenta58253cd67bbef5a6b0bc37505370041e8f6c9a3 (diff)
downloadmediapointer-dvb-s2-840ab7d279cb1b52ac095b757209fe4029606bfe.tar.gz
mediapointer-dvb-s2-840ab7d279cb1b52ac095b757209fe4029606bfe.tar.bz2
- change all occurences of crc32_le to crc32_be
Please test if the kernel-version of crc32_be (2.6.0-testX) works for DVB crc checking. Feedback appreciated!
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_compat.c4
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_compat.h2
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_demux.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_compat.c b/linux/drivers/media/dvb/dvb-core/dvb_compat.c
index bc10b5b78..7fbcbc152 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_compat.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_compat.c
@@ -60,7 +60,7 @@ u32 crc32_table[256] = {
0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4};
-u32 crc32_le (u32 crc, unsigned char const *data, size_t len)
+u32 crc32_be (u32 crc, unsigned char const *data, size_t len)
{
int i;
@@ -70,7 +70,7 @@ u32 crc32_le (u32 crc, unsigned char const *data, size_t len)
return crc;
}
-EXPORT_SYMBOL(crc32_le);
+EXPORT_SYMBOL(crc32_be);
#endif
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_compat.h b/linux/drivers/media/dvb/dvb-core/dvb_compat.h
index 3d865c6f1..68458de0e 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_compat.h
+++ b/linux/drivers/media/dvb/dvb-core/dvb_compat.h
@@ -68,7 +68,7 @@ void cond_resched (void)
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-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);
#else
#include <linux/crc32.h>
#endif
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.c b/linux/drivers/media/dvb/dvb-core/dvb_demux.c
index fa73e43b8..53df83d5e 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c
@@ -107,7 +107,7 @@ void dvb_set_crc32(u8 *data, int length)
{
u32 crc;
- crc = crc32_le(~0, data, length);
+ crc = crc32_be(~0, data, length);
data[length] = (crc >> 24) & 0xff;
data[length+1] = (crc >> 16) & 0xff;
@@ -118,7 +118,7 @@ void dvb_set_crc32(u8 *data, int length)
static u32 dvb_dmx_crc32 (struct dvb_demux_feed *f, const u8 *src, size_t len)
{
- return (f->feed.sec.crc_val = crc32_le (f->feed.sec.crc_val, src, len));
+ return (f->feed.sec.crc_val = crc32_be (f->feed.sec.crc_val, src, len));
}