]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - net/link_local.c
SPL: SPI: select SPL_SPI_FLASH_SUPPORT on SPL_SPI_SUNXI
[people/ms/u-boot.git] / net / link_local.c
index ea5b4f4332b7b3e443741d524b6b76f4d85b44fe..31cdef4083a2e7afc183159f9552e9a00564193b 100644 (file)
@@ -99,19 +99,19 @@ static void configure_wait(void)
        debug_cond(DEBUG_DEV_PKT, "...wait %d %s nprobes=%u, nclaims=%u\n",
                   timeout_ms, eth_get_name(), nprobes, nclaims);
 
-       NetSetTimeout(timeout_ms, link_local_timeout);
+       net_set_timeout_handler(timeout_ms, link_local_timeout);
 }
 
 void link_local_start(void)
 {
-       ip = getenv_ip("llipaddr");
+       ip = env_get_ip("llipaddr");
        if (ip.s_addr != 0 &&
            (ntohl(ip.s_addr) & IN_CLASSB_NET) != LINKLOCAL_ADDR) {
                puts("invalid link address");
                net_set_state(NETLOOP_FAIL);
                return;
        }
-       net_netmask.s_addr = IN_CLASSB_NET;
+       net_netmask.s_addr = htonl(IN_CLASSB_NET);
 
        seed = seed_mac();
        if (ip.s_addr == 0)
@@ -182,7 +182,7 @@ static void link_local_timeout(void)
                        conflicts = 0;
                        timeout_ms = -1;
                        /* Never timeout in the monitor state */
-                       NetSetTimeout(0, NULL);
+                       net_set_timeout_handler(0, NULL);
 
                        /* NOTE: all other exit paths should deconfig ... */
                        net_set_state(NETLOOP_SUCCESS);