mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
staging: vt6655: Use ether_crc in kernel.
ether_crc is already in kernel remove local code and include linux/crc32.h Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
65fe76eaa0
commit
b39d60c1de
2 changed files with 1 additions and 17 deletions
|
@ -49,6 +49,7 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/if.h>
|
||||
#include <linux/crc32.h>
|
||||
//#include <linux/config.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
|
|
@ -2561,23 +2561,6 @@ static irqreturn_t device_intr(int irq, void *dev_instance)
|
|||
return IRQ_RETVAL(handled);
|
||||
}
|
||||
|
||||
static unsigned const ethernet_polynomial = 0x04c11db7U;
|
||||
static inline u32 ether_crc(int length, unsigned char *data)
|
||||
{
|
||||
int crc = -1;
|
||||
|
||||
while (--length >= 0) {
|
||||
unsigned char current_octet = *data++;
|
||||
int bit;
|
||||
|
||||
for (bit = 0; bit < 8; bit++, current_octet >>= 1) {
|
||||
crc = (crc << 1) ^
|
||||
((crc < 0) ^ (current_octet & 1) ? ethernet_polynomial : 0);
|
||||
}
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
|
||||
//2008-8-4 <add> by chester
|
||||
static int Config_FileGetParameter(unsigned char *string,
|
||||
unsigned char *dest, unsigned char *source)
|
||||
|
|
Loading…
Reference in a new issue