diff options
| author | Andrey Panin <pazke@donpac.ru> | 2004-06-26 21:00:01 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-26 21:00:01 -0700 |
| commit | a0c09d010fce660084a04d22cad4864ea3793699 (patch) | |
| tree | b6a48e348a4e687e0446d6088507f63ddcf8d481 /include | |
| parent | b71671f826afa30232097800c2da7ffe3c52062f (diff) | |
[PATCH] crc: use it in IRDA drivers
This patch makes IRDA subsystem use common crc16 code.
Signed-off-by: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/irda/crc.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/net/irda/crc.h b/include/net/irda/crc.h index 3cbbe798e996..741bb995f623 100644 --- a/include/net/irda/crc.h +++ b/include/net/irda/crc.h @@ -15,19 +15,15 @@ #define IRDA_CRC_H #include <linux/types.h> +#include <linux/crc16.h> #define INIT_FCS 0xffff /* Initial FCS value */ #define GOOD_FCS 0xf0b8 /* Good final FCS value */ -extern __u16 const irda_crc16_table[]; - /* Recompute the FCS with one more character appended. */ -static inline __u16 irda_fcs(__u16 fcs, __u8 c) -{ - return (((fcs) >> 8) ^ irda_crc16_table[((fcs) ^ (c)) & 0xff]); -} +#define irda_fcs(fcs, c) crc16_byte(fcs, c) /* Recompute the FCS with len bytes appended. */ -__u16 irda_calc_crc16( __u16 fcs, __u8 const *buf, size_t len); +#define irda_calc_crc16(fcs, buf, len) crc16(fcs, buf, len) #endif |
