Browse Source

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>
Malcolm Priestley 11 years ago
parent
commit
a06978bc6d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      drivers/staging/vt6656/tether.c

+ 3 - 3
drivers/staging/vt6656/tether.c

@@ -51,11 +51,11 @@
  */
  */
 bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength)
 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 false;
+
 	return true;
 	return true;
 }
 }