summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorPeter Tyser <ptyser@xes-inc.com>2010-09-30 11:25:48 -0500
committerBen Warren <biggerbadderben@gmail.com>2010-10-11 23:00:29 -0700
commitbf6cb247a5df202fbed4fd43df477d863b68fbe1 (patch)
tree364503e9fb4b160fbf0f985aee02a486d2d2aed5 /net/net.c
parent3f91ec0fa1ceab413fa2e74b4ffd37ab505cc66c (diff)
downloadu-boot-imx-bf6cb247a5df202fbed4fd43df477d863b68fbe1.zip
u-boot-imx-bf6cb247a5df202fbed4fd43df477d863b68fbe1.tar.gz
u-boot-imx-bf6cb247a5df202fbed4fd43df477d863b68fbe1.tar.bz2
rarp: Condtionally compile rarp support
Most people don't use the 'rarpboot' command, so only enable it when CONFIG_CMD_RARP is defined. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c11
1 files changed, 9 insertions, 2 deletions
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);