From: Malcolm Priestley <tvboxspy@gmail.com>
Date: Wed, 21 May 2014 20:09:41 +0000 (+0100)
Subject: staging: vt6656: ETHbIsBufferCrc32Ok replace CRCdwGetCrc32
X-Git-Tag: firefly_0821_release~176^2~3465^2~39^2~440
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a06978bc6d3877783643d95fab45299871840a50;p=firefly-linux-kernel-4.4.55.git

staging: vt6656: ETHbIsBufferCrc32Ok replace CRCdwGetCrc32

CRCdwGetCrc32 is a bitwise not of ether_crc_le.

Replace with ether_crc_le.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

diff --git a/drivers/staging/vt6656/tether.c b/drivers/staging/vt6656/tether.c
index 1db1e8419a9a..ada3e7e630c4 100644
--- a/drivers/staging/vt6656/tether.c
+++ b/drivers/staging/vt6656/tether.c
@@ -51,11 +51,11 @@
  */
 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;
 }