mirror of https://gitee.com/openkylin/linux.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>
This commit is contained in:
parent
4fccf1d6b5
commit
a06978bc6d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue