]> git.hungrycats.org Git - linux/commitdiff
[PATCH] CRC16 renaming in ISDN drivers
authorAndrey Panin <pazke@donpac.ru>
Sun, 11 Jul 2004 02:36:24 +0000 (19:36 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 11 Jul 2004 02:36:24 +0000 (19:36 -0700)
Signed-off-by: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/isdn/hisax/isdnhdlc.c
drivers/isdn/hisax/st5481_hdlc.c
drivers/isdn/tpam/tpam_crcpc.c

index 3293f518a09acbef1db3a7c8c68ba198d7cd4d4c..c25b3d649d33658251afcce2835d697eb1fceec0 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <linux/module.h>
 #include <linux/init.h>
-#include <linux/crc16.h>
+#include <linux/crc-ccitt.h>
 #include "isdnhdlc.h"
 
 /*-------------------------------------------------------------------*/
@@ -305,7 +305,7 @@ int isdnhdlc_decode (struct isdnhdlc_vars *hdlc, const unsigned char *src,
                        if(hdlc->data_bits==8){
                                hdlc->data_bits = 0;
                                hdlc->data_received = 1;
-                               hdlc->crc = crc16_byte(hdlc->crc, hdlc->shift_reg);
+                               hdlc->crc = crc_ccitt_byte(hdlc->crc, hdlc->shift_reg);
 
                                // good byte received
                                if (dsize--) {
@@ -482,7 +482,7 @@ int isdnhdlc_encode(struct isdnhdlc_vars *hdlc, const unsigned char *src,
                                break;
                        }
                        if(hdlc->bit_shift==8){
-                               hdlc->crc = crc16_byte(hdlc->crc, hdlc->shift_reg);
+                               hdlc->crc = crc_ccitt_byte(hdlc->crc, hdlc->shift_reg);
                        }
                        if(hdlc->shift_reg & 0x01){
                                hdlc->hdlc_bits1++;
index da7970ef062272a629d309c826025c768ab51ef4..680f42e9a993d9ba141d09de3074a708a8e7b40e 100644 (file)
@@ -10,7 +10,7 @@
  *
  */
 
-#include <linux/crc16.h>
+#include <linux/crc-ccitt.h>
 #include "st5481_hdlc.h"
 
 
@@ -262,7 +262,7 @@ int hdlc_decode(struct hdlc_vars *hdlc, const unsigned char *src,
                        if(hdlc->data_bits==8){
                                hdlc->data_bits = 0;
                                hdlc->data_received = 1;
-                               hdlc->crc = crc16_byte(hdlc->crc, hdlc->shift_reg);
+                               hdlc->crc = crc_ccitt_byte(hdlc->crc, hdlc->shift_reg);
 
                                // good byte received
                                if (dsize--) {
@@ -439,7 +439,7 @@ int hdlc_encode(struct hdlc_vars *hdlc, const unsigned char *src,
                                break;
                        }
                        if(hdlc->bit_shift==8){
-                               hdlc->crc = crc16_byte(hdlc->crc, hdlc->shift_reg);
+                               hdlc->crc = crc_ccitt_byte(hdlc->crc, hdlc->shift_reg);
                        }
                        if(hdlc->shift_reg & 0x01){
                                hdlc->hdlc_bits1++;
index dadbd7e076a7bd47386574344e2a747b0b3ce5c9..fae8df7ae1365207b3008aac4cceb212931e10f6 100644 (file)
@@ -27,7 +27,7 @@ Revision History:
 
 ---------------------------------------------------------------------------*/
 
-#include <linux/crc16.h>
+#include <linux/crc-ccitt.h>
 #include "tpam.h"
 
 #define  HDLC_CTRL_CHAR_CMPL_MASK      0x20    /* HDLC control character complement mask */
@@ -85,7 +85,7 @@ void hdlc_encode_modem(u8 *buffer_in, u32 lng_in,
                /*
                 *   FCS calculation
                 */
-               fcs = crc16_byte(fcs, data);
+               fcs = crc_ccitt_byte(fcs, data);
 
                ESCAPE_CHAR(p_data_out, data);
        }
@@ -121,7 +121,7 @@ void hdlc_no_accm_encode(u8 *buffer_in, u32 lng_in,
        while (lng_in--) {
                data = *buffer_in++;
                /* calculate FCS */
-               fcs = crc16_byte(fcs, data);
+               fcs = crc_ccitt_byte(fcs, data);
                *p_data_out++ = data;
        }
 
@@ -151,7 +151,7 @@ u32 hdlc_no_accm_decode(u8 *buffer_in, u32 lng_in) {
        while (lng_in--) {
                data = *buffer_in++;
                /* calculate FCS */
-               fcs = crc16_byte(fcs, data);
+               fcs = crc_ccitt_byte(fcs, data);
        }
 
        if (fcs == HDLC_FCS_OK)