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>
This commit is contained in:
Malcolm Priestley 2014-05-21 21:09:41 +01:00 committed by Greg Kroah-Hartman
parent 4fccf1d6b5
commit a06978bc6d
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}