summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-10-12 20:44:46 +0200
committerWolfgang Denk <wd@denx.de>2010-10-12 20:44:46 +0200
commit0ee8746a93e29a3d884f19598409a3bea8ff51ab (patch)
tree1544d350005f0ff1403c21e2c795575e51901ae1 /net
parent456be17dbe0e22ee2be9fafa1ea8888ddf6bd514 (diff)
parent1ca6d0df3ecb028e989f3489b95d021f4497477b (diff)
downloadu-boot-imx-0ee8746a93e29a3d884f19598409a3bea8ff51ab.zip
u-boot-imx-0ee8746a93e29a3d884f19598409a3bea8ff51ab.tar.gz
u-boot-imx-0ee8746a93e29a3d884f19598409a3bea8ff51ab.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'net')
-rw-r--r--net/Makefile2
-rw-r--r--net/eth.c16
-rw-r--r--net/net.c11
3 files changed, 14 insertions, 15 deletions
diff --git a/net/Makefile b/net/Makefile
index 4f819dd..216d1ec 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -32,7 +32,7 @@ COBJS-$(CONFIG_CMD_DNS) += dns.o
COBJS-$(CONFIG_CMD_NET) += eth.o
COBJS-$(CONFIG_CMD_NET) += net.o
COBJS-$(CONFIG_CMD_NFS) += nfs.o
-COBJS-$(CONFIG_CMD_NET) += rarp.o
+COBJS-$(CONFIG_CMD_RARP) += rarp.o
COBJS-$(CONFIG_CMD_SNTP) += sntp.o
COBJS-$(CONFIG_CMD_NET) += tftp.o
diff --git a/net/eth.c b/net/eth.c
index 993306f..5c70d4f 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -263,7 +263,6 @@ int eth_initialize(bd_t *bis)
dev = dev->next;
} while(dev != eth_devices);
-#ifdef CONFIG_NET_MULTI
/* update current ethernet name */
if (eth_current) {
char *act = getenv("ethact");
@@ -271,7 +270,6 @@ int eth_initialize(bd_t *bis)
setenv("ethact", eth_current->name);
} else
setenv("ethact", NULL);
-#endif
putc ('\n');
}
@@ -441,7 +439,7 @@ int eth_receive(volatile void *packet, int length)
void eth_try_another(int first_restart)
{
static struct eth_device *first_failed = NULL;
- char *ethrotate;
+ char *ethrotate, *act;
/*
* Do not rotate between network interfaces when
@@ -460,21 +458,16 @@ void eth_try_another(int first_restart)
eth_current = eth_current->next;
-#ifdef CONFIG_NET_MULTI
/* update current ethernet name */
- {
- char *act = getenv("ethact");
- if (act == NULL || strcmp(act, eth_current->name) != 0)
- setenv("ethact", eth_current->name);
- }
-#endif
+ act = getenv("ethact");
+ if (act == NULL || strcmp(act, eth_current->name) != 0)
+ setenv("ethact", eth_current->name);
if (first_failed == eth_current) {
NetRestartWrap = 1;
}
}
-#ifdef CONFIG_NET_MULTI
void eth_set_current(void)
{
static char *act = NULL;
@@ -501,7 +494,6 @@ void eth_set_current(void)
setenv("ethact", eth_current->name);
}
-#endif
char *eth_get_name (void)
{
diff --git a/net/net.c b/net/net.c
index 33fcd90..d5a5429 100644
--- a/net/net.c
+++ b/net/net.c
@@ -80,7 +80,9 @@
#include <net.h>
#include "bootp.h"
#include "tftp.h"
+#ifdef CONFIG_CMD_RARP
#include "rarp.h"
+#endif
#include "nfs.h"
#ifdef CONFIG_STATUS_LED
#include <status_led.h>
@@ -401,11 +403,13 @@ restart:
BootpRequest ();
break;
+#if defined(CONFIG_CMD_RARP)
case RARP:
RarpTry = 0;
NetOurIP = 0;
RarpRequest ();
break;
+#endif
#if defined(CONFIG_CMD_PING)
case PING:
PingStart();
@@ -1492,6 +1496,7 @@ NetReceive(volatile uchar * inpkt, int len)
}
break;
+#ifdef CONFIG_CMD_RARP
case PROT_RARP:
debug("Got RARP\n");
arp = (ARP_t *)ip;
@@ -1515,7 +1520,7 @@ NetReceive(volatile uchar * inpkt, int len)
(*packetHandler)(0,0,0,0);
}
break;
-
+#endif
case PROT_IP:
debug("Got IP\n");
/* Before we start poking the header, make sure it is there */
@@ -1729,10 +1734,12 @@ static int net_check_prereq (proto_t protocol)
}
/* Fall through */
- case DHCP:
+#ifdef CONFIG_CMD_RARP
case RARP:
+#endif
case BOOTP:
case CDP:
+ case DHCP:
if (memcmp (NetOurEther, "\0\0\0\0\0\0", 6) == 0) {
#ifdef CONFIG_NET_MULTI
extern int eth_get_dev_index (void);