提交 ae6134bd 编写于 作者: M Micah Dowty 提交者: David S. Miller

hdlcdrv: Fix CRC calculation.

This is a trivial patch against the hdlcdrv module that fixes its CRC
calculation. The finished CRC was overwriting the first two bytes of
each packet rather than being appended to the end.

I've tested this with 2.6.8 and 2.6.10-rc1, but hdlcdrv hasn't changed
much recently so it should work with many other kernel versions.
Signed-off-by: NMicah Dowty <micah@navi.cx>
Acked-by: NThomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d3678b46
......@@ -88,6 +88,7 @@
static inline void append_crc_ccitt(unsigned char *buffer, int len)
{
unsigned int crc = crc_ccitt(0xffff, buffer, len) ^ 0xffff;
buffer += len;
*buffer++ = crc;
*buffer++ = crc >> 8;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册