summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/update.c1
-rw-r--r--drivers/net/phy/atheros.c2
-rw-r--r--include/net.h9
-rw-r--r--net/arp.c6
-rw-r--r--net/bootp.c6
-rw-r--r--net/net.c2
-rw-r--r--net/ping.h3
-rw-r--r--net/tftp.h3
8 files changed, 17 insertions, 15 deletions
diff --git a/common/update.c b/common/update.c
index 5b1a064..94d6a82 100644
--- a/common/update.c
+++ b/common/update.c
@@ -37,6 +37,7 @@
#include <command.h>
#include <flash.h>
#include <net.h>
+#include <net/tftp.h>
#include <malloc.h>
/* env variable holding the location of the update file */
diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index 798473d..9b3808b 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -30,7 +30,7 @@ static int ar8021_config(struct phy_device *phydev)
return 0;
}
-struct phy_driver AR8021_driver = {
+static struct phy_driver AR8021_driver = {
.name = "AR8021",
.uid = 0x4dd040,
.mask = 0xfffff0,
diff --git a/include/net.h b/include/net.h
index 3539336..970d4d1 100644
--- a/include/net.h
+++ b/include/net.h
@@ -102,12 +102,13 @@ extern int eth_register(struct eth_device* dev);/* Register network device */
extern int eth_unregister(struct eth_device *dev);/* Remove network device */
extern void eth_try_another(int first_restart); /* Change the device */
extern void eth_set_current(void); /* set nterface to ethcur var */
+
/* get the current device MAC */
+extern struct eth_device *eth_current;
+
static inline __attribute__((always_inline))
struct eth_device *eth_get_dev(void)
{
- extern struct eth_device *eth_current;
-
return eth_current;
}
extern struct eth_device *eth_get_dev_by_name(const char *devname);
@@ -517,10 +518,10 @@ enum net_loop_state {
NETLOOP_SUCCESS,
NETLOOP_FAIL
};
+extern enum net_loop_state net_state;
+
static inline void net_set_state(enum net_loop_state state)
{
- extern enum net_loop_state net_state;
-
debug_cond(DEBUG_INT_STATE, "--- NetState set to %d\n", state);
net_state = state;
}
diff --git a/net/arp.c b/net/arp.c
index 8e1d2ed..20c6b2d 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -27,15 +27,15 @@
#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)
{
diff --git a/net/bootp.c b/net/bootp.c
index cd5c5dd..4300f1c 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -41,9 +41,9 @@ ulong BootpID;
int BootpTry;
#if defined(CONFIG_CMD_DHCP)
-dhcp_state_t dhcp_state = INIT;
-unsigned long dhcp_leasetime;
-IPaddr_t NetDHCPServerIP;
+static dhcp_state_t dhcp_state = INIT;
+static unsigned long dhcp_leasetime;
+static IPaddr_t NetDHCPServerIP;
static void DhcpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
unsigned len);
diff --git a/net/net.c b/net/net.c
index 569fec4..82c4cc9 100644
--- a/net/net.c
+++ b/net/net.c
@@ -180,7 +180,7 @@ IPaddr_t NetNtpServerIP;
int NetTimeOffset;
#endif
-uchar PktBuf[(PKTBUFSRX+1) * PKTSIZE_ALIGN + PKTALIGN];
+static uchar PktBuf[(PKTBUFSRX+1) * PKTSIZE_ALIGN + PKTALIGN];
/* Receive packet */
uchar *NetRxPackets[PKTBUFSRX];
diff --git a/net/ping.h b/net/ping.h
index fd8d8d9..8c71be4 100644
--- a/net/ping.h
+++ b/net/ping.h
@@ -8,8 +8,6 @@
* Copyright 2000-2002 Wolfgang Denk, wd@denx.de
*/
-#if defined(CONFIG_CMD_PING)
-
#ifndef __PING_H__
#define __PING_H__
@@ -31,4 +29,3 @@ void ping_start(void);
void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len);
#endif /* __PING_H__ */
-#endif
diff --git a/net/tftp.h b/net/tftp.h
index 18e4c9c..2b686e3 100644
--- a/net/tftp.h
+++ b/net/tftp.h
@@ -22,6 +22,9 @@ void TftpStart(enum proto_t protocol); /* Begin TFTP get/put */
extern void TftpStartServer(void); /* Wait for incoming TFTP put */
#endif
+extern ulong TftpRRQTimeoutMSecs;
+extern int TftpRRQTimeoutCountMax;
+
/**********************************************************************/
#endif /* __TFTP_H__ */