summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-11-27 16:13:00 +0100
committerWolfgang Denk <wd@denx.de>2006-11-27 16:13:00 +0100
commitd3c5e8b2f5945d93de8f23b053e9dcd033983245 (patch)
tree72c292c41bc0dfadd6f634fe03e697d8a4473487 /net
parent98280e3d431db77d92219438b8840853bd7cb412 (diff)
parenta9398e018593782c5fa7d0741955fc1256b34c1e (diff)
downloadtalos-obmc-uboot-d3c5e8b2f5945d93de8f23b053e9dcd033983245.tar.gz
talos-obmc-uboot-d3c5e8b2f5945d93de8f23b053e9dcd033983245.zip
Merge with /home/wd/git/u-boot/master
Diffstat (limited to 'net')
-rw-r--r--net/Makefile20
-rw-r--r--net/bootp.c7
-rw-r--r--net/eth.c16
-rw-r--r--net/tftp.c2
4 files changed, 35 insertions, 10 deletions
diff --git a/net/Makefile b/net/Makefile
index 7a704898c2..d18460cab3 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1,5 +1,5 @@
#
-# (C) Copyright 2000
+# (C) Copyright 2000-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
@@ -25,19 +25,23 @@ include $(TOPDIR)/config.mk
# CFLAGS += -DET_DEBUG -DDEBUG
-LIB = libnet.a
+LIB = $(obj)libnet.a
+
+COBJS = net.o tftp.o bootp.o rarp.o eth.o nfs.o sntp.o
+
+SRCS := $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
-OBJS = net.o tftp.o bootp.o rarp.o eth.o nfs.o sntp.o
all: $(LIB)
-$(LIB): $(START) $(OBJS)
- $(AR) crv $@ $(OBJS)
+$(LIB): $(obj).depend $(OBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
#########################################################################
-.depend: Makefile $(OBJS:.o=.c)
- $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-sinclude .depend
+sinclude $(obj).depend
#########################################################################
diff --git a/net/bootp.c b/net/bootp.c
index 669d74a6a5..1de9a8f2c6 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -851,7 +851,12 @@ static void DhcpSendRequestPkt(Bootp_t *bp_offer)
NetCopyIP(&bp->bp_ciaddr, &bp_offer->bp_ciaddr); /* both in network byte order */
NetCopyIP(&bp->bp_yiaddr, &bp_offer->bp_yiaddr);
NetCopyIP(&bp->bp_siaddr, &bp_offer->bp_siaddr);
- NetCopyIP(&bp->bp_giaddr, &bp_offer->bp_giaddr);
+ /*
+ * RFC3046 requires Relay Agents to discard packets with
+ * nonzero and offered giaddr
+ */
+ NetWriteIP(&bp->bp_giaddr, 0);
+
memcpy (bp->bp_chaddr, NetOurEther, 6);
/*
diff --git a/net/eth.c b/net/eth.c
index 6f48aacaf9..e8ac251a4f 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -196,6 +196,22 @@ int eth_initialize(bd_t *bis)
tsec_initialize(bis, 3, CONFIG_MPC83XX_TSEC4_NAME);
# endif
#endif
+#if defined(CONFIG_MPC86XX_TSEC1)
+ tsec_initialize(bis, 0, CONFIG_MPC86XX_TSEC1_NAME);
+#endif
+
+#if defined(CONFIG_MPC86XX_TSEC2)
+ tsec_initialize(bis, 1, CONFIG_MPC86XX_TSEC2_NAME);
+#endif
+
+#if defined(CONFIG_MPC86XX_TSEC3)
+ tsec_initialize(bis, 2, CONFIG_MPC86XX_TSEC3_NAME);
+#endif
+
+#if defined(CONFIG_MPC86XX_TSEC4)
+ tsec_initialize(bis, 3, CONFIG_MPC86XX_TSEC4_NAME);
+#endif
+
#if defined(FEC_ENET) || defined(CONFIG_ETHER_ON_FCC)
fec_initialize(bis);
#endif
diff --git a/net/tftp.c b/net/tftp.c
index eca21d294e..f3a5471483 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -225,7 +225,7 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len)
if (TftpBlock == 0) {
TftpBlockWrap++;
TftpBlockWrapOffset += TFTP_BLOCK_SIZE * TFTP_SEQUENCE_SIZE;
- printf ("\n\t %lu MB reveived\n\t ", TftpBlockWrapOffset>>20);
+ printf ("\n\t %lu MB received\n\t ", TftpBlockWrapOffset>>20);
} else {
if (((TftpBlock - 1) % 10) == 0) {
putc ('#');
OpenPOWER on IntegriCloud