summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-12-18 21:27:49 +0300
committerTom Rini <trini@konsulko.com>2022-01-21 22:01:34 +0300
commit4b37fd146bb86b72f52b97386602ae58727b09fc (patch)
tree578d5b4efd797c908d38a6faa3bd2daa1e25f57d /net/net.c
parent3df6cd4d63678065ce82637d995ed3170e9e56cd (diff)
downloadu-boot-4b37fd146bb86b72f52b97386602ae58727b09fc.tar.xz
Convert CONFIG_UDP_CHECKSUM to Kconfig
This converts the following to Kconfig: CONFIG_UDP_CHECKSUM Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/net.c b/net/net.c
index c2992a0908..43e230aeb9 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1264,8 +1264,7 @@ void net_process_received_packet(uchar *in_packet, int len)
"received UDP (to=%pI4, from=%pI4, len=%d)\n",
&dst_ip, &src_ip, len);
-#ifdef CONFIG_UDP_CHECKSUM
- if (ip->udp_xsum != 0) {
+ if (IS_ENABLED(CONFIG_UDP_CHECKSUM) && ip->udp_xsum != 0) {
ulong xsum;
u8 *sumptr;
ushort sumlen;
@@ -1298,7 +1297,6 @@ void net_process_received_packet(uchar *in_packet, int len)
return;
}
}
-#endif
#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD)
nc_input_packet((uchar *)ip + IP_UDP_HDR_SIZE,