]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - net/bootme.c
omap5: Exclude more environment from SPL builds
[karo-tx-uboot.git] / net / bootme.c
index 29f86d3ddea91845b35555c2fefadc28c4d539d7..ef6195e0f590d58035a7f5ee9917103f4605b222 100644 (file)
@@ -113,7 +113,7 @@ static int check_net_config(void)
                if (bootme_ip == 0) {
                        bip = getenv("bootmeip");
                        if (bip) {
-                               bootme_ip = getenv_IPaddr("bootmeip");
+                               bootme_ip = getenv_ip("bootmeip");
                                if (!bootme_ip)
                                        return -EINVAL;
                                p = strchr(bip, ':');
@@ -197,7 +197,7 @@ static void bootme_handler(uchar *pkt, unsigned dest_port, struct in_addr src_ip
        }
        if (bootme_state == BOOTME_INIT || bootme_state == BOOTME_DEBUG_INIT) {
                struct ethernet_hdr *eth = (struct ethernet_hdr *)(pkt -
-                                       NetEthHdrSize() - IP_UDP_HDR_SIZE);
+                                       net_eth_hdr_size() - IP_UDP_HDR_SIZE);
                memcpy(bootme_ether, eth->et_src, sizeof(bootme_ether));
                printf("Target MAC address set to %pM\n", bootme_ether);
 
@@ -225,7 +225,7 @@ static void bootme_handler(uchar *pkt, unsigned dest_port, struct in_addr src_ip
 
        case BOOTME_DOWNLOAD:
                if (last_state != BOOTME_INIT)
-                       NetBootFileXferSize += len - 4;
+                       net_boot_file_size += len - 4;
                /* fallthru */
        case BOOTME_DEBUG:
                if (last_state == BOOTME_INIT ||
@@ -251,7 +251,7 @@ void BootmeStart(void)
                check_net_config();
 
        if (output_packet_len == 0 ||
-               is_valid_ether_addr(bootme_ether)) {
+               is_valid_ethaddr(bootme_ether)) {
                /* wait for incoming packet */
                net_set_udp_handler(bootme_handler);
                bootme_timed_out = 0;
@@ -261,12 +261,12 @@ void BootmeStart(void)
                uchar *pkt;
 
                net_set_arp_handler(bootme_wait_arp_handler);
-               assert(NetTxPacket != NULL);
-               pkt = (uchar *)NetTxPacket + NetEthHdrSize() + IP_UDP_HDR_SIZE;
+               assert(net_tx_packet != NULL);
+               pkt = (uchar *)net_tx_packet + net_eth_hdr_size() + IP_UDP_HDR_SIZE;
                memcpy(pkt, output_packet, output_packet_len);
                debug("%s@%d: Sending ARP request:\n", __func__, __LINE__);
                ce_dump_block(pkt, output_packet_len);
-               NetSendUDPPacket(bootme_ether, bootme_ip, bootme_dst_port,
+               net_send_udp_packet(bootme_ether, bootme_ip, bootme_dst_port,
                                bootme_src_port, output_packet_len);
                output_packet_len = 0;
        }
@@ -286,7 +286,7 @@ int bootme_send_frame(const void *buf, size_t len)
                check_net_config();
 
        debug("%s: buf: %p len: %u from %pI4:%d to %pI4:%d\n",
-               __func__, buf, len, &NetOurIP, bootme_src_port, &bootme_ip,
+               __func__, buf, len, &net_ip, bootme_src_port, &bootme_ip,
                bootme_dst_port);
 
        if (is_zero_ether_addr(bootme_ether)) {
@@ -315,11 +315,11 @@ int bootme_send_frame(const void *buf, size_t len)
                }
        }
 
-       assert(NetTxPacket != NULL);
-       pkt = (uchar *)NetTxPacket + NetEthHdrSize() + IP_UDP_HDR_SIZE;
+       assert(net_tx_packet != NULL);
+       pkt = (uchar *)net_tx_packet + net_eth_hdr_size() + IP_UDP_HDR_SIZE;
        memcpy(pkt, buf, len);
 
-       ret = NetSendUDPPacket(bootme_ether, bootme_ip, bootme_dst_port,
+       ret = net_send_udp_packet(bootme_ether, bootme_ip, bootme_dst_port,
                        bootme_src_port, len);
        if (ret)
                printf("Failed to send packet: %d\n", ret);