diff --git a/net/net.c b/net/net.c index 7dc1bc6..4554d49 100644 --- a/net/net.c +++ b/net/net.c @@ -189,18 +189,6 @@ (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 @@ 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