Skip to contentSkip to conversation

: ir251_export_crc-2.diff

PATCH New Jean Tourrilhes 1 participant 1 message Oct 11, 2002 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : ir251_export_crc-2.diff

ir251_export_crc-2.diff :
-----------------------
o [FEATURE] Export CRC16 helper so that drivers can use it

include/net/irda/crc.h renamed from include/net/irda/crc.d3.h +1 -1
diff -u -p linux/include/net/irda/crc.d3.h linux/include/net/irda/crc.h
@@ -28,6 +28,6 @@ static inline __u16 irda_fcs(__u16 fcs, 
 }
 
 /* Recompute the FCS with len bytes appended. */
-unsigned short crc_calc( __u16 fcs, __u8 const *buf, size_t len);
+unsigned short irda_calc_crc16( __u16 fcs, __u8 const *buf, size_t len);
 
 #endif
net/irda/crc.c renamed from net/irda/crc.d3.c +1 -1
diff -u -p linux/net/irda/crc.d3.c linux/net/irda/crc.c
@@ -57,7 +57,7 @@ __u16 const irda_crc16_table[256] =
 	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
 };
 
-unsigned short crc_calc( __u16 fcs, __u8 const *buf, size_t len) 
+unsigned short irda_calc_crc16( __u16 fcs, __u8 const *buf, size_t len) 
 {
 	while (len--)
                 fcs = irda_fcs(fcs, *buf++);
net/irda/irsyms.c renamed from net/irda/irsyms.d3.c +2 -0
diff -u -p linux/net/irda/irsyms.d3.c linux/net/irda/irsyms.c
@@ -42,6 +42,7 @@
 #include <net/irda/wrapper.h>
 #include <net/irda/timer.h>
 #include <net/irda/parameters.h>
+#include <net/irda/crc.h>
 
 extern struct proc_dir_entry *proc_irda;
 
@@ -163,6 +164,7 @@ EXPORT_SYMBOL(irda_task_delete);
 
 EXPORT_SYMBOL(async_wrap_skb);
 EXPORT_SYMBOL(async_unwrap_char);
+EXPORT_SYMBOL(irda_calc_crc16);
 EXPORT_SYMBOL(irda_start_timer);
 EXPORT_SYMBOL(setup_dma);
 EXPORT_SYMBOL(infrared_mode);