summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/elog/boot_count.c6
-rw-r--r--src/drivers/intel/fsp1_1/hob.c1
-rw-r--r--src/drivers/net/ne2k.c4
3 files changed, 5 insertions, 6 deletions
diff --git a/src/drivers/elog/boot_count.c b/src/drivers/elog/boot_count.c
index 17d928a451..9d618f9500 100644
--- a/src/drivers/elog/boot_count.c
+++ b/src/drivers/elog/boot_count.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#include <commonlib/bsd/ipchksum.h>
#include <console/console.h>
-#include <ip_checksum.h>
#include <pc80/mc146818rtc.h>
#include <stdint.h>
#include <elog.h>
@@ -47,7 +47,7 @@ static int boot_count_cmos_read(struct boot_count *bc)
}
/* Verify checksum over signature and counter only */
- csum = compute_ip_checksum(bc, offsetof(struct boot_count, checksum));
+ csum = ipchksum(bc, offsetof(struct boot_count, checksum));
if (csum != bc->checksum) {
printk(BIOS_DEBUG, "Boot Count checksum mismatch\n");
@@ -63,7 +63,7 @@ static void boot_count_cmos_write(struct boot_count *bc)
u8 i, *p;
/* Checksum over signature and counter only */
- bc->checksum = compute_ip_checksum(
+ bc->checksum = ipchksum(
bc, offsetof(struct boot_count, checksum));
for (p = (u8 *)bc, i = 0; i < sizeof(*bc); i++, p++)
diff --git a/src/drivers/intel/fsp1_1/hob.c b/src/drivers/intel/fsp1_1/hob.c
index e7c5fb4393..7522df120c 100644
--- a/src/drivers/intel/fsp1_1/hob.c
+++ b/src/drivers/intel/fsp1_1/hob.c
@@ -3,7 +3,6 @@
#include <arch/hlt.h>
#include <console/console.h>
#include <fsp/util.h>
-#include <ip_checksum.h>
#include <string.h>
/* Compares two EFI GUIDs. Returns true of the GUIDs match, false otherwise. */
diff --git a/src/drivers/net/ne2k.c b/src/drivers/net/ne2k.c
index 4479a76742..70ef0efc39 100644
--- a/src/drivers/net/ne2k.c
+++ b/src/drivers/net/ne2k.c
@@ -28,11 +28,11 @@ SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02
*/
#include <arch/io.h>
+#include <commonlib/bsd/ipchksum.h>
#include <console/ne2k.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ops.h>
-#include <ip_checksum.h>
#include "ns8390.h"
@@ -184,7 +184,7 @@ static void ns8390_tx_header(unsigned int eth_nic_base, int pktlen)
hdr[38] = (8 + pktlen) >> 8;
hdr[39] = 8 + pktlen;
- chksum = compute_ip_checksum(&hdr[14], 20);
+ chksum = ipchksum(&hdr[14], 20);
hdr[25] = chksum >> 8;
hdr[24] = chksum;