* [PATCH] Fix for hdlcdrv (ham radio) CRC calculation
@ 2004-11-10 12:51 Micah Dowty
0 siblings, 0 replies; only message in thread
From: Micah Dowty @ 2004-11-10 12:51 UTC (permalink / raw)
To: linux-kernel
Hello,
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>
(Not subscribed, please CC: replies)
--- drivers/net/hamradio/hdlcdrv.c.orig 2004-11-10 12:33:00.365920000 -0700
+++ drivers/net/hamradio/hdlcdrv.c 2004-11-10 12:34:02.043543576 -0700
@@ -106,6 +106,7 @@ static char ax25_nocall[AX25_ADDR_LEN] =
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;
}
--Micah
--
Only you can prevent creeping featurism!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-11-10 12:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-10 12:51 [PATCH] Fix for hdlcdrv (ham radio) CRC calculation Micah Dowty
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.