[lkml]   [2004]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] Fix for hdlcdrv (ham radio) 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: Micah Dowty <>

    (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;

    Only you can prevent creeping featurism!
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:07    [W:0.020 / U:35.208 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site