summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-01-04 16:09:36 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2010-02-01 17:25:32 +0100
commit42f4ca1c85bfbc83831a1dfe16289fbb9e588f46 (patch)
tree0bae7f69d9cab8e5d01e2784079ca6374b0f0fff /net
parent8f0d0f25ed7fc104a1924101bf73158c879f75f0 (diff)
downloadbarebox-42f4ca1c85bfbc83831a1dfe16289fbb9e588f46.tar.gz
barebox-42f4ca1c85bfbc83831a1dfe16289fbb9e588f46.tar.xz
put only once used function inline
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r--net/net.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/net/net.c b/net/net.c
index 7dc1bc676a..4554d49e36 100644
--- a/net/net.c
+++ b/net/net.c
@@ -189,18 +189,6 @@ void ArpRequest (void)
(void) eth_send (NetTxPacket, (pkt - NetTxPacket) + ARP_HDR_SIZE);
}
-static void ArpTimeoutCheck(void)
-{
- if (!NetArpWaitPacketIP)
- return;
-
- /* check for arp timeout */
- if (is_timeout(NetArpWaitTimerStart, ARP_TIMEOUT)) {
- NetArpWaitTimerStart = get_time_ns();
- ArpRequest();
- }
-}
-
/**********************************************************************/
/*
* Main network processing loop.
@@ -298,7 +286,12 @@ int NetLoop(void)
return -1;
}
- ArpTimeoutCheck();
+ /* check for arp timeout */
+ if (NetArpWaitPacketIP &&
+ is_timeout(NetArpWaitTimerStart, ARP_TIMEOUT)) {
+ NetArpWaitTimerStart = get_time_ns();
+ ArpRequest();
+ }
/*
* Check for a timeout, and run the timeout handler