All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Panin <pazke@donpac.ru>
To: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 3/5] 2.6.7-mm6, CRC16 renaming in ISDN drivers
Date: Thu, 8 Jul 2004 17:01:27 +0400	[thread overview]
Message-ID: <10892916872918@donpac.ru> (raw)
In-Reply-To: <10892916843577@donpac.ru>


Signed-off-by: Andrey Panin <pazke@donpac.ru>

 drivers/isdn/hisax/isdnhdlc.c    |    6 +++---
 drivers/isdn/hisax/st5481_hdlc.c |    6 +++---
 drivers/isdn/tpam/tpam_crcpc.c   |    8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff -urpN -X /usr/share/dontdiff linux-2.6.7-mm5.vanilla/drivers/isdn/hisax/isdnhdlc.c linux-2.6.7-mm5/drivers/isdn/hisax/isdnhdlc.c
--- linux-2.6.7-mm5.vanilla/drivers/isdn/hisax/isdnhdlc.c	Thu Jul  1 20:58:08 2004
+++ linux-2.6.7-mm5/drivers/isdn/hisax/isdnhdlc.c	Thu Jul  1 22:47:30 2004
@@ -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_var
 			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
 				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++;
diff -urpN -X /usr/share/dontdiff linux-2.6.7-mm5.vanilla/drivers/isdn/hisax/st5481_hdlc.c linux-2.6.7-mm5/drivers/isdn/hisax/st5481_hdlc.c
--- linux-2.6.7-mm5.vanilla/drivers/isdn/hisax/st5481_hdlc.c	Thu Jul  1 20:58:08 2004
+++ linux-2.6.7-mm5/drivers/isdn/hisax/st5481_hdlc.c	Thu Jul  1 22:47:08 2004
@@ -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, 
 			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, 
 				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++;
diff -urpN -X /usr/share/dontdiff linux-2.6.7-mm5.vanilla/drivers/isdn/tpam/tpam_crcpc.c linux-2.6.7-mm5/drivers/isdn/tpam/tpam_crcpc.c
--- linux-2.6.7-mm5.vanilla/drivers/isdn/tpam/tpam_crcpc.c	Thu Jul  1 20:58:09 2004
+++ linux-2.6.7-mm5/drivers/isdn/tpam/tpam_crcpc.c	Thu Jul  1 22:46:06 2004
@@ -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, u3
 		/*
 		 *   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, 
 	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, u
 	while (lng_in--) {
 		data = *buffer_in++;
 		/* calculate FCS */
-		fcs = crc16_byte(fcs, data);
+		fcs = crc_ccitt_byte(fcs, data);
 	}
 
 	if (fcs == HDLC_FCS_OK) 


  reply	other threads:[~2004-07-08 13:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-08 13:01 [PATCH 0/5] 2.6.7-mm6, fix CRC16 misnaming Andrey Panin
2004-07-08 13:01 ` [PATCH 1/5] 2.6.7-mm6, CRC16 renaming in AX25 drivers Andrey Panin
2004-07-08 13:01   ` [PATCH 2/5] 2.6.7-mm6, CRC16 renaming in IRDA drivers Andrey Panin
2004-07-08 13:01     ` Andrey Panin [this message]
2004-07-08 13:01       ` [PATCH 4/5] 2.6.7-mm6, CRC16 renaming in PPP driver Andrey Panin
2004-07-08 13:01         ` [PATCH 5/5] 2.6.7-mm6, CRC16 renaming in VIA Velocity ethernet driver Andrey Panin
2004-07-08 13:10 ` [PATCH 0/5] 2.6.7-mm6, fix CRC16 misnaming David Weinehall
2004-07-08 19:11   ` Thomas Sailer
2004-07-09  2:06 ` Andrew Morton

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=10892916872918@donpac.ru \
    --to=pazke@donpac.ru \
    --cc=akpm@osdl.org \
    --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.