diff options
author | Simon Glass <sjg@chromium.org> | 2015-01-19 22:16:09 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-24 06:13:44 -0700 |
commit | b18c68d8918095672b295aef7bfbfc466b82c710 (patch) | |
tree | 2094482b6b58739fdbafff8ce77de9510f29fef2 /arch/x86/cpu/coreboot/tables.c | |
parent | 9b0e35cb4889eb04a7ea5dd648d73df0bf37cc68 (diff) | |
download | u-boot-imx-b18c68d8918095672b295aef7bfbfc466b82c710.zip u-boot-imx-b18c68d8918095672b295aef7bfbfc466b82c710.tar.gz u-boot-imx-b18c68d8918095672b295aef7bfbfc466b82c710.tar.bz2 |
x86: Use ipchecksum from net/
The existing IP checksum function is only accessible to the 'coreboot' cpu.
Drop it in favour of the new code in the network subsystem.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu/coreboot/tables.c')
-rw-r--r-- | arch/x86/cpu/coreboot/tables.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c index 92b7528..2b12b19 100644 --- a/arch/x86/cpu/coreboot/tables.c +++ b/arch/x86/cpu/coreboot/tables.c @@ -8,7 +8,7 @@ */ #include <common.h> -#include <asm/arch/ipchecksum.h> +#include <net.h> #include <asm/arch/sysinfo.h> #include <asm/arch/tables.h> @@ -131,11 +131,11 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) return 0; /* Make sure the checksums match. */ - if (ipchksum((u16 *) header, sizeof(*header)) != 0) + if (!ip_checksum_ok(header, sizeof(*header))) return -1; - if (ipchksum((u16 *) (ptr + sizeof(*header)), - header->table_bytes) != header->table_checksum) + if (compute_ip_checksum(ptr + sizeof(*header), header->table_bytes) != + header->table_checksum) return -1; /* Now, walk the tables. */ |