From: Malcolm Priestley Date: Wed, 21 May 2014 20:09:41 +0000 (+0100) Subject: staging: vt6656: ETHbIsBufferCrc32Ok replace CRCdwGetCrc32 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a06978bc6d3877783643d95fab45299871840a50;p=linux-beck.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 Signed-off-by: Greg Kroah-Hartman --- 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; }