]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: phy: ncsi: Correct the endian of the checksum
authorJacky Chou <jacky_chou@aspeedtech.com>
Mon, 5 Feb 2024 08:02:28 +0000 (16:02 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 26 Mar 2024 23:58:26 +0000 (19:58 -0400)
There is no need to perform the endian twice here.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
drivers/net/phy/ncsi.c

index 9689385884753797646f813103cc1240ba4e7c15..f9069c3a10d7d5bb8775bd5ad8336af6b67b366b 100644 (file)
@@ -551,7 +551,7 @@ static int ncsi_send_command(unsigned int np, unsigned int nc, unsigned int cmd,
        checksum = ncsi_calculate_checksum((unsigned char *)hdr,
                                           sizeof(*hdr) + len);
        pchecksum = (__be32 *)((void *)(hdr + 1) + len);
-       put_unaligned_be32(htonl(checksum), pchecksum);
+       put_unaligned_be32(checksum, pchecksum);
 
        if (wait) {
                net_set_timeout_handler(1000UL, ncsi_timeout_handler);