diff options
| author | Markus Klotzbuecher <mk@denx.de> | 2008-01-09 13:57:10 +0100 |
|---|---|---|
| committer | Markus Klotzbuecher <mk@denx.de> | 2008-01-09 13:57:10 +0100 |
| commit | 6a40ef62c4300e9f606deef0a4618cbc4b514a51 (patch) | |
| tree | c01bdd0e773d092f13af05567fa92fb9072df9e0 /net/net.c | |
| parent | 245a362ad3c0c1b84fccc9fec7b623eb14f6e502 (diff) | |
| parent | 07eb02687f008721974a2fb54cd7fdc28033ab3c (diff) | |
| download | olio-uboot-2014.01-6a40ef62c4300e9f606deef0a4618cbc4b514a51.tar.xz olio-uboot-2014.01-6a40ef62c4300e9f606deef0a4618cbc4b514a51.zip | |
Merge git://www.denx.de/git/u-boot
Conflicts:
board/tqm5200/tqm5200.c
Diffstat (limited to 'net/net.c')
| -rw-r--r-- | net/net.c | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -94,7 +94,7 @@ DECLARE_GLOBAL_DATA_PTR; -#define ARP_TIMEOUT 5 /* Seconds before trying ARP again */ +#define ARP_TIMEOUT 5UL /* Seconds before trying ARP again */ #ifndef CONFIG_NET_RETRY_COUNT # define ARP_TIMEOUT_COUNT 5 /* # of timeouts before giving up */ #else @@ -137,6 +137,9 @@ uchar NetBcastAddr[6] = /* Ethernet bcast address */ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; uchar NetEtherNullAddr[6] = { 0, 0, 0, 0, 0, 0 }; +#ifdef CONFIG_API +void (*push_packet)(volatile void *, int len) = 0; +#endif #if defined(CONFIG_CMD_CDP) uchar NetCDPAddr[6] = /* Ethernet bcast address */ { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc }; @@ -589,16 +592,18 @@ void NetStartAgain (void) return; } #ifndef CONFIG_NET_MULTI - NetSetTimeout (10 * CFG_HZ, startAgainTimeout); + NetSetTimeout (10UL * CFG_HZ, startAgainTimeout); NetSetHandler (startAgainHandler); #else /* !CONFIG_NET_MULTI*/ eth_halt (); +#if !defined(CONFIG_NET_DO_NOT_TRY_ANOTHER) eth_try_another (!NetRestarted); +#endif eth_init (gd->bd); if (NetRestartWrap) { NetRestartWrap = 0; if (NetDevExists && !once) { - NetSetTimeout (10 * CFG_HZ, startAgainTimeout); + NetSetTimeout (10UL * CFG_HZ, startAgainTimeout); NetSetHandler (startAgainHandler); } else { NetState = NETLOOP_FAIL; @@ -774,7 +779,7 @@ static void PingStart(void) #if defined(CONFIG_NET_MULTI) printf ("Using %s device\n", eth_get_name()); #endif /* CONFIG_NET_MULTI */ - NetSetTimeout (10 * CFG_HZ, PingTimeout); + NetSetTimeout (10UL * CFG_HZ, PingTimeout); NetSetHandler (PingHandler); PingSend(); @@ -1161,6 +1166,13 @@ NetReceive(volatile uchar * inpkt, int len) if (len < ETHER_HDR_SIZE) return; +#ifdef CONFIG_API + if (push_packet) { + (*push_packet)(inpkt, len); + return; + } +#endif + #if defined(CONFIG_CMD_CDP) /* keep track if packet is CDP */ iscdp = memcmp(et->et_dest, NetCDPAddr, 6) == 0; |