summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2009-04-28 08:36:11 +0200
committerWolfgang Denk <wd@denx.de>2009-05-15 21:19:02 +0200
commitda95427ce431908714ae5e9f663ee6e2bc3bcc33 (patch)
tree92075e2d30363b08b7ca4282db4696a1675aa37b /net
parent3c1d89545de11822f8b5afb5646a57757620bd95 (diff)
downloadu-boot-da95427ce431908714ae5e9f663ee6e2bc3bcc33.tar.gz
u-boot-da95427ce431908714ae5e9f663ee6e2bc3bcc33.tar.xz
u-boot-da95427ce431908714ae5e9f663ee6e2bc3bcc33.zip
netloop: updates for NetLoop
Fix some issues introduced from commit: 2f70c49e5b9813635ad73666aa30f304c7fdeda9 suggested by Mike Frysinger. - added some comment for the env_id variable in common_cmd_nvedit.c - moved some variables in fn scope instead of file scope - NetInitLoop now static void Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/eth.c5
-rw-r--r--net/net.c7
2 files changed, 5 insertions, 7 deletions
diff --git a/net/eth.c b/net/eth.c
index c6fa5b9431..8940ebf117 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -57,9 +57,6 @@ int eth_setenv_enetaddr(char *name, const uchar *enetaddr)
#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
-static char *act = NULL;
-static int env_changed_id = 0;
-
/*
* CPU and board-specific Ethernet initializations. Aliased function
* signals caller to move on
@@ -471,6 +468,8 @@ void eth_try_another(int first_restart)
#ifdef CONFIG_NET_MULTI
void eth_set_current(void)
{
+ static char *act = NULL;
+ static int env_changed_id = 0;
struct eth_device* old_current;
int env_id;
diff --git a/net/net.c b/net/net.c
index b8648bd95a..5637cf54f6 100644
--- a/net/net.c
+++ b/net/net.c
@@ -209,8 +209,6 @@ uchar NetArpWaitPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
ulong NetArpWaitTimerStart;
int NetArpWaitTry;
-int env_changed_id = 0;
-
void ArpRequest (void)
{
int i;
@@ -278,9 +276,10 @@ void ArpTimeoutCheck(void)
}
}
-int
+static void
NetInitLoop(proto_t protocol)
{
+ static int env_changed_id = 0;
bd_t *bd = gd->bd;
int env_id = get_env_id ();
@@ -295,7 +294,7 @@ NetInitLoop(proto_t protocol)
env_changed_id = env_id;
}
- return 0;
+ return;
}
/**********************************************************************/