Merge branch 'for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
[cascardo/linux.git] / drivers / staging / vt6656 / tether.c
index 1db1e84..2ef54f6 100644 (file)
@@ -33,7 +33,6 @@
 
 #include "device.h"
 #include "tmacro.h"
-#include "tcrc.h"
 #include "tether.h"
 
 /*
  */
 bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength)
 {
-       u32 dwCRC;
+       u32 n_crc = ~ether_crc_le(cbFrameLength - 4, pbyBuffer);
 
-       dwCRC = CRCdwGetCrc32(pbyBuffer, cbFrameLength - 4);
-       if (cpu_to_le32(*((u32 *)(pbyBuffer + cbFrameLength - 4))) != dwCRC)
+       if (le32_to_cpu(*((__le32 *)(pbyBuffer + cbFrameLength - 4))) != n_crc)
                return false;
+
        return true;
 }