From: Micah Dowty <micah@navi.cx>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix for hdlcdrv (ham radio) CRC calculation
Date: Wed, 10 Nov 2004 05:51:48 -0700 [thread overview]
Message-ID: <20041110125148.GA3557@navi.cx> (raw)
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!
reply other threads:[~2004-11-10 12:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041110125148.GA3557@navi.cx \
--to=micah@navi.cx \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.