]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - net/arp.c
net: Refactor in preparation for driver model
[karo-tx-uboot.git] / net / arp.c
index bac4cab5efa55153c14c620b0be47598a82b05f4..21ed31bf742dd3582add21aed5bf1333591d3c0e 100644 (file)
--- a/net/arp.c
+++ b/net/arp.c
@@ -6,6 +6,7 @@
  *     Copyright 2000 Roland Borde
  *     Copyright 2000 Paolo Scaffardi
  *     Copyright 2000-2002 Wolfgang Denk, wd@denx.de
+ *     SPDX-License-Identifier:        GPL-2.0
  */
 
 #include <common.h>
 #endif
 
 IPaddr_t       NetArpWaitPacketIP;
-IPaddr_t       NetArpWaitReplyIP;
+static IPaddr_t        NetArpWaitReplyIP;
 /* MAC address of waiting packet's destination */
 uchar         *NetArpWaitPacketMAC;
 int            NetArpWaitTxPacketSize;
 ulong          NetArpWaitTimerStart;
 int            NetArpWaitTry;
 
-uchar         *NetArpTxPacket; /* THE ARP transmit packet */
-uchar          NetArpPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
+static uchar   *NetArpTxPacket;        /* THE ARP transmit packet */
+static uchar   NetArpPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
 
 void ArpInit(void)
 {
@@ -194,7 +195,7 @@ void ArpReceive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
 #ifdef CONFIG_KEEP_SERVERADDR
                if (NetServerIP == NetArpWaitPacketIP) {
                        char buf[20];
-                       sprintf(buf, "%pM", arp->ar_sha);
+                       sprintf(buf, "%pM", &arp->ar_sha);
                        setenv("serveraddr", buf);
                }
 #endif