Commit a1d2cf2e authored by Andrey Panin's avatar Andrey Panin Committed by Linus Torvalds

[PATCH] CRC16 renaming in AX25 drivers

Signed-off-by: default avatarAndrey Panin <pazke@donpac.ru>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8ce84a2f
......@@ -58,7 +58,7 @@
/* prototypes for ax25_encapsulate and ax25_rebuild_header */
#include <net/ax25.h>
#endif /* CONFIG_AX25 || CONFIG_AX25_MODULE */
#include <linux/crc16.h>
#include <linux/crc-ccitt.h>
/* --------------------------------------------------------------------- */
......@@ -281,14 +281,14 @@ static inline void append_crc_ccitt(unsigned char *buffer, int len)
static inline int check_crc_ccitt(const unsigned char *buf, int cnt)
{
return (crc16(0xffff, buf, cnt) & 0xffff) == 0xf0b8;
return (crc_ccitt(0xffff, buf, cnt) & 0xffff) == 0xf0b8;
}
/*---------------------------------------------------------------------------*/
static inline int calc_crc_ccitt(const unsigned char *buf, int cnt)
{
return (crc16(0xffff, buf, cnt) ^ 0xffff) & 0xffff;
return (crc_ccitt(0xffff, buf, cnt) ^ 0xffff) & 0xffff;
}
/* ---------------------------------------------------------------------- */
......
......@@ -66,7 +66,7 @@
#include <linux/ip.h>
#include <linux/udp.h>
#include <linux/tcp.h>
#include <linux/crc16.h>
#include <linux/crc-ccitt.h>
/* --------------------------------------------------------------------- */
......@@ -105,7 +105,7 @@ static char ax25_nocall[AX25_ADDR_LEN] =
static inline void append_crc_ccitt(unsigned char *buffer, int len)
{
unsigned int crc = crc16(0xffff, buffer, len) ^ 0xffff;
unsigned int crc = crc_ccitt(0xffff, buffer, len) ^ 0xffff;
*buffer++ = crc;
*buffer++ = crc >> 8;
}
......@@ -114,7 +114,7 @@ static inline void append_crc_ccitt(unsigned char *buffer, int len)
static inline int check_crc_ccitt(const unsigned char *buf, int cnt)
{
return (crc16(0xffff, buf, cnt) & 0xffff) == 0xf0b8;
return (crc_ccitt(0xffff, buf, cnt) & 0xffff) == 0xf0b8;
}
/*---------------------------------------------------------------------------*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment