diff options
| author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 | 
|---|---|---|
| committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 | 
| commit | cb5473205206c7f14cbb1e747f28ec75b48826e2 (patch) | |
| tree | 8f4808d60917100b18a10b05230f7638a0a9bbcc /net/bootp.c | |
| parent | baf449fc5ff96f071bb0e3789fd3265f6d4fd9a0 (diff) | |
| parent | 92c78a3bbcb2ce508b4bf1c4a1e0940406a024bb (diff) | |
| download | olio-uboot-2014.01-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.xz olio-uboot-2014.01-cb5473205206c7f14cbb1e747f28ec75b48826e2.zip | |
Merge branch 'fixes' into cleanups
Conflicts:
	board/atmel/atngw100/atngw100.c
	board/atmel/atstk1000/atstk1000.c
	cpu/at32ap/at32ap700x/gpio.c
	include/asm-avr32/arch-at32ap700x/clk.h
	include/configs/atngw100.h
	include/configs/atstk1002.h
	include/configs/atstk1003.h
	include/configs/atstk1004.h
	include/configs/atstk1006.h
	include/configs/favr-32-ezkit.h
	include/configs/hammerhead.h
	include/configs/mimc200.h
Diffstat (limited to 'net/bootp.c')
| -rw-r--r-- | net/bootp.c | 26 | 
1 files changed, 13 insertions, 13 deletions
| diff --git a/net/bootp.c b/net/bootp.c index 64552ac2a..83465e41a 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -33,7 +33,7 @@  #if defined(CONFIG_CMD_NET) -#define TIMEOUT		5UL		/* Seconds before trying BOOTP again	*/ +#define TIMEOUT		5000UL	/* Milliseconds before trying BOOTP again */  #ifndef CONFIG_NET_RETRY_COUNT  # define TIMEOUT_COUNT	5		/* # of timeouts before giving up  */  #else @@ -371,7 +371,7 @@ BootpTimeout(void)  		puts ("\nRetry count exceeded; starting again\n");  		NetStartAgain ();  	} else { -		NetSetTimeout (TIMEOUT * CFG_HZ, BootpTimeout); +		NetSetTimeout (TIMEOUT, BootpTimeout);  		BootpRequest ();  	}  } @@ -671,7 +671,7 @@ BootpRequest (void)  	bp->bp_htype = HWT_ETHER;  	bp->bp_hlen = HWL_ETHER;  	bp->bp_hops = 0; -	bp->bp_secs = htons(get_timer(0) / CFG_HZ); +	bp->bp_secs = htons(get_timer(0) / 1000);  	NetWriteIP(&bp->bp_ciaddr, 0);  	NetWriteIP(&bp->bp_yiaddr, 0);  	NetWriteIP(&bp->bp_siaddr, 0); @@ -688,7 +688,7 @@ BootpRequest (void)  	/*  	 *	Bootp ID is the lower 4 bytes of our ethernet address -	 *	plus the current time in HZ. +	 *	plus the current time in ms.  	 */  	BootpID = ((ulong)NetOurEther[2] << 24)  		| ((ulong)NetOurEther[3] << 16) @@ -705,7 +705,7 @@ BootpRequest (void)  	pktlen = BOOTP_SIZE - sizeof(bp->bp_vend) + ext_len;  	iplen = BOOTP_HDR_SIZE - sizeof(bp->bp_vend) + ext_len;  	NetSetIP(iphdr, 0xFFFFFFFFL, PORT_BOOTPS, PORT_BOOTPC, iplen); -	NetSetTimeout(SELECT_TIMEOUT * CFG_HZ, BootpTimeout); +	NetSetTimeout(SELECT_TIMEOUT, BootpTimeout);  #if defined(CONFIG_CMD_DHCP)  	dhcp_state = SELECTING; @@ -849,7 +849,7 @@ static void DhcpSendRequestPkt(Bootp_t *bp_offer)  	bp->bp_htype = HWT_ETHER;  	bp->bp_hlen = HWL_ETHER;  	bp->bp_hops = 0; -	bp->bp_secs = htons(get_timer(0) / CFG_HZ); +	bp->bp_secs = htons(get_timer(0) / 1000);  	/* Do not set the client IP, your IP, or server IP yet, since it hasn't been ACK'ed by  	 * the server yet */ @@ -912,11 +912,11 @@ DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)  		 * OFFER from a server we want.  		 */  		debug ("DHCP: state=SELECTING bp_file: \"%s\"\n", bp->bp_file); -#ifdef CFG_BOOTFILE_PREFIX +#ifdef CONFIG_SYS_BOOTFILE_PREFIX  		if (strncmp(bp->bp_file, -			    CFG_BOOTFILE_PREFIX, -			    strlen(CFG_BOOTFILE_PREFIX)) == 0 ) { -#endif	/* CFG_BOOTFILE_PREFIX */ +			    CONFIG_SYS_BOOTFILE_PREFIX, +			    strlen(CONFIG_SYS_BOOTFILE_PREFIX)) == 0 ) { +#endif	/* CONFIG_SYS_BOOTFILE_PREFIX */  			debug ("TRANSITIONING TO REQUESTING STATE\n");  			dhcp_state = REQUESTING; @@ -924,11 +924,11 @@ 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); -			NetSetTimeout(TIMEOUT * CFG_HZ, BootpTimeout); +			NetSetTimeout(TIMEOUT, BootpTimeout);  			DhcpSendRequestPkt(bp); -#ifdef CFG_BOOTFILE_PREFIX +#ifdef CONFIG_SYS_BOOTFILE_PREFIX  		} -#endif	/* CFG_BOOTFILE_PREFIX */ +#endif	/* CONFIG_SYS_BOOTFILE_PREFIX */  		return;  		break; |