Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a06978bc authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman
Browse files

staging: vt6656: ETHbIsBufferCrc32Ok replace CRCdwGetCrc32



CRCdwGetCrc32 is a bitwise not of ether_crc_le.

Replace with ether_crc_le.

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4fccf1d6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
}