aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2008-06-22 14:20:49 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 07:13:08 -0300
commitf51b10ef6520f2bd725dc333e771eabd55d6c04f (patch)
tree2334e29554e17384ccc6270f4baaaa69a24e2579 /drivers/media/dvb
parent38f993ad8b1fe4caf9e989caf6e2a25aff3bbaf7 (diff)
V4L/DVB (8126): net endianness fix
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 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index c2334aef414..ff716109402 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -606,7 +606,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);