From 9b55a2536919f4de1bb1044e6eb8262c2f53bc96 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Fri, 11 Jul 2008 01:16:00 +0200 Subject: Fix some more print() format errors. Signed-off-by: Wolfgang Denk --- net/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net') diff --git a/net/net.c b/net/net.c index f55c7facf2..2a26bc0dd1 100644 --- a/net/net.c +++ b/net/net.c @@ -1520,7 +1520,8 @@ NetReceive(volatile uchar * inpkt, int len) xsum = (xsum & 0x0000ffff) + ((xsum >> 16) & 0x0000ffff); } if ((xsum != 0x00000000) && (xsum != 0x0000ffff)) { - printf(" UDP wrong checksum %08x %08x\n", xsum, ntohs(ip->udp_xsum)); + printf(" UDP wrong checksum %08lx %08x\n", + xsum, ntohs(ip->udp_xsum)); return; } } -- cgit From 0a5676befb0c590212a53f7627fa5d0d8a84bf34 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 12 Jul 2008 14:36:34 +0200 Subject: Fix some more printf() format issues. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/net.c b/net/net.c index 2a26bc0dd1..c96f566fab 100644 --- a/net/net.c +++ b/net/net.c @@ -1390,7 +1390,7 @@ NetReceive(volatile uchar * inpkt, int len) puts ("Got IP\n"); #endif if (len < IP_HDR_SIZE) { - debug ("len bad %d < %d\n", len, IP_HDR_SIZE); + debug ("len bad %d < %ld\n", len, IP_HDR_SIZE); return; } if (len < ntohs(ip->ip_len)) { -- cgit From 25dbe98abb686d8210e1731fba85ced7d3ce874c Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 13 Jul 2008 23:07:35 +0200 Subject: Fix some more printf() format issues. Signed-off-by: Wolfgang Denk --- net/eth.c | 2 +- net/net.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/eth.c b/net/eth.c index 7fc9aeea5e..38979aa5a5 100644 --- a/net/eth.c +++ b/net/eth.c @@ -627,7 +627,7 @@ int eth_initialize(bd_t *bis) #if defined(CONFIG_MCF52x2) mcf52x2_miiphy_initialize(bis); #endif -#if defined(CONFIG_NETARM) +#if defined(CONFIG_DRIVER_NS7520_ETHERNET) ns7520_miiphy_initialize(bis); #endif #if defined(CONFIG_DRIVER_TI_EMAC) diff --git a/net/net.c b/net/net.c index c96f566fab..313d5d8dab 100644 --- a/net/net.c +++ b/net/net.c @@ -1390,7 +1390,7 @@ NetReceive(volatile uchar * inpkt, int len) puts ("Got IP\n"); #endif if (len < IP_HDR_SIZE) { - debug ("len bad %d < %ld\n", len, IP_HDR_SIZE); + debug ("len bad %d < %lu\n", len, (ulong)IP_HDR_SIZE); return; } if (len < ntohs(ip->ip_len)) { -- cgit From b64f190b7a34224df09b559ca111eb1b733f00ad Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 14 Jul 2008 15:06:35 +0200 Subject: Fix printf() format issues with sizeof_t types by using %zu Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Wolfgang Denk --- net/bootp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/bootp.c b/net/bootp.c index 3c0614c5cf..f48744abfd 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -313,7 +313,7 @@ BootpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len) Bootp_t *bp; char *s; - debug ("got BOOTP packet (src=%d, dst=%d, len=%d want_len=%d)\n", + debug ("got BOOTP packet (src=%d, dst=%d, len=%d want_len=%zu)\n", src, dest, len, sizeof (Bootp_t)); bp = (Bootp_t *)pkt; -- cgit From 0328ef0edfe950f0b7b8b368dae482531506b74a Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Tue, 15 Jul 2008 21:44:46 +0200 Subject: Fix DHCP protocol so U-Boot does not respond too early on the network with it's offered IP number; it should not reply until after it has received a DHCP ACK message. Also ensures that U-Boot does it's DHCPREQUEST as broadcast (per RFC 2131). Signed-off-by: Robin Getz Acked-by: Ben Warren Signed-off-by: Wolfgang Denk --- net/bootp.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'net') diff --git a/net/bootp.c b/net/bootp.c index f48744abfd..5121caa51b 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -924,8 +924,6 @@ DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len) if (NetReadLong((ulong*)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC)) DhcpOptionsProcess((u8 *)&bp->bp_vend[4], bp); - BootpCopyNetParams(bp); /* Store net params from reply */ - NetSetTimeout(TIMEOUT * CFG_HZ, BootpTimeout); DhcpSendRequestPkt(bp); #ifdef CFG_BOOTFILE_PREFIX -- cgit