diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-22 14:20:49 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-22 14:20:49 +0000 |
commit | a64ec6b36dd6773bfada490525d6bde19e54da52 (patch) | |
tree | 9c497fa5187b4ee9942ce5b77d8fa3f492c435e5 /linux/drivers/media/dvb/dvb-core | |
parent | 444c36366e475d6559588f1a25244b0a78b437d5 (diff) | |
download | mediapointer-dvb-s2-a64ec6b36dd6773bfada490525d6bde19e54da52.tar.gz mediapointer-dvb-s2-a64ec6b36dd6773bfada490525d6bde19e54da52.tar.bz2 |
net endianness fix
From: Al Viro <viro@ftp.linux.org.uk>
According to RFC 4326 (4.1) D-bit is MSB in net-endian 16bit.
dvb_net.c did
/* Set D-bit for CRC32 verification,
* if it was set originally. */
ulen |= 0x0080;
which works of little-endian (htons(1<<15) is 0x0080 there), but breaks
on big-endian.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c index 04b207fd7..2d2da4dff 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_net.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c @@ -621,7 +621,7 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) if (priv->ule_dbit) { /* Set D-bit for CRC32 verification, * if it was set originally. */ - ulen |= 0x0080; + ulen |= htons(0x8000); } ule_crc = iov_crc32(ule_crc, iov, 3); |