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

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

staging: vt6656: s_vSWencryption replace CRCdwGetCrc32Ex



Replace with ether_crc_le which gives the same result.

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a06978bc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -304,7 +304,7 @@ static void s_vSWencryption(struct vnt_private *pDevice,
    if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
        //=======================================================================
        // Append ICV after payload
        dwICV = CRCdwGetCrc32Ex(pbyPayloadHead, wPayloadSize, dwICV);//ICV(Payload)
	dwICV = ether_crc_le(wPayloadSize, pbyPayloadHead);
        pdwICV = (u32 *)(pbyPayloadHead + wPayloadSize);
        // finally, we must invert dwCRC to get the correct answer
        *pdwICV = cpu_to_le32(~dwICV);
@@ -315,7 +315,7 @@ static void s_vSWencryption(struct vnt_private *pDevice,
    } else if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
        //=======================================================================
        //Append ICV after payload
        dwICV = CRCdwGetCrc32Ex(pbyPayloadHead, wPayloadSize, dwICV);//ICV(Payload)
	dwICV = ether_crc_le(wPayloadSize, pbyPayloadHead);
        pdwICV = (u32 *)(pbyPayloadHead + wPayloadSize);
        // finally, we must invert dwCRC to get the correct answer
        *pdwICV = cpu_to_le32(~dwICV);