Merge tag 'fixes-for-2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot...
[oweals/u-boot.git] / net / dns.c
index cf4ed8624b5474642c092ed259f8d9af6ebfeb37..67d761d7c0f5f81e32b5f4e633b7f66dd076ce16 100644 (file)
--- a/net/dns.c
+++ b/net/dns.c
@@ -24,6 +24,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <net.h>
 #include <asm/unaligned.h>
 
@@ -184,7 +185,7 @@ static void dns_handler(uchar *pkt, unsigned dest, struct in_addr sip,
                        ip_to_string(ip_addr, ip_str);
                        printf("%s\n", ip_str);
                        if (net_dns_env_var)
-                               setenv(net_dns_env_var, ip_str);
+                               env_set(net_dns_env_var, ip_str);
                } else {
                        puts("server responded with invalid IP number\n");
                }
@@ -197,7 +198,7 @@ void dns_start(void)
 {
        debug("%s\n", __func__);
 
-       NetSetTimeout(DNS_TIMEOUT, dns_timeout_handler);
+       net_set_timeout_handler(DNS_TIMEOUT, dns_timeout_handler);
        net_set_udp_handler(dns_handler);
 
        /* Clear a previous MAC address, the server IP might have changed. */