summaryrefslogtreecommitdiff
path: root/net/arp.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-12-18 11:27:48 -0700
committerTom Rini <trini@konsulko.com>2022-01-21 14:01:34 -0500
commit3df6cd4d63678065ce82637d995ed3170e9e56cd (patch)
treee63d441b26732f0acf9294aa9421587105321e9f /net/arp.c
parent2d7a463e82daeba4f6a7fb59bac0fe94d6f6d3a2 (diff)
downloadu-boot-3df6cd4d63678065ce82637d995ed3170e9e56cd.tar.gz
u-boot-3df6cd4d63678065ce82637d995ed3170e9e56cd.tar.bz2
u-boot-3df6cd4d63678065ce82637d995ed3170e9e56cd.zip
Convert CONFIG_KEEP_SERVERADDR to Kconfig
This converts the following to Kconfig: CONFIG_KEEP_SERVERADDR Drop the preprocessor usage also. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/arp.c')
-rw-r--r--net/arp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/arp.c b/net/arp.c
index 1d06ed2572..0b086dc8d2 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -196,13 +196,12 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
if (!arp_is_waiting())
break;
-#ifdef CONFIG_KEEP_SERVERADDR
- if (net_server_ip.s_addr == net_arp_wait_packet_ip.s_addr) {
+ if (IS_ENABLED(CONFIG_KEEP_SERVERADDR) &&
+ net_server_ip.s_addr == net_arp_wait_packet_ip.s_addr) {
char buf[20];
sprintf(buf, "%pM", &arp->ar_sha);
env_set("serveraddr", buf);
}
-#endif
reply_ip_addr = net_read_ip(&arp->ar_spa);