aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2013-11-03 19:02:41 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-11 16:33:23 -0800
commitf0fde117c12692f76887e09944f4d923a5470bdd (patch)
treeb8c6d68e7a534b62e9d7c5c125142255fd4641c4 /drivers/staging/vt6656
parentcbc06fb10c7295855c28c3a4b84b96b48e1dd844 (diff)
staging: vt6656: main_usb.c ether_crc use kernel code
use ether_crc already in kernel and remove local version. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r--drivers/staging/vt6656/device.h1
-rw-r--r--drivers/staging/vt6656/main_usb.c16
2 files changed, 1 insertions, 16 deletions
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 739cda41b5a..b7a6e14e4d9 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -44,6 +44,7 @@
#include <net/cfg80211.h>
#include <linux/timer.h>
#include <linux/usb.h>
+#include <linux/crc32.h>
#ifdef SIOCETHTOOL
#define DEVICE_ETHTOOL_IOCTL_SUPPORT
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 21805c65031..4cb7aa737a9 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -1194,22 +1194,6 @@ out:
return NETDEV_TX_OK;
}
-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;
-}
-
/* find out the start position of str2 from str1 */
static unsigned char *kstrstr(const unsigned char *str1,
const unsigned char *str2) {