diff options
author | Micah Dowty <micah@navi.cx> | 2008-07-23 23:46:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-28 10:58:16 -0700 |
commit | 7252bc6ab55f64f1ee99a4e777e08a2bef970ac0 (patch) | |
tree | fe4cd4d49226183793859b22bfb78bab09ee0ac3 | |
parent | 938b773dac5b933f133f9158b796ba0f29c4ea52 (diff) | |
download | lwn-7252bc6ab55f64f1ee99a4e777e08a2bef970ac0.tar.gz lwn-7252bc6ab55f64f1ee99a4e777e08a2bef970ac0.zip |
hdlcdrv: Fix CRC calculation.
[ Upstream commit ae6134bdf3197206fba95563d755d2fa50d90ddd ]
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: Micah Dowty <micah@navi.cx>
Acked-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/net/hamradio/hdlcdrv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index ae9629fa6882..c258a0586e61 100644 --- a/drivers/net/hamradio/hdlcdrv.c +++ b/drivers/net/hamradio/hdlcdrv.c @@ -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; } |