diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2016-07-29 11:30:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-09 00:40:05 +0200 |
commit | e068853409aa17208e94f4ca628005cc6f51e043 (patch) | |
tree | 0dab4352bf2c41d751f57bc7e45fac690f9ff937 /net/ipv4/ipconfig.c | |
parent | net: ipconfig: Support using "delayed" DHCP replies (diff) | |
download | linux-e068853409aa17208e94f4ca628005cc6f51e043.tar.xz linux-e068853409aa17208e94f4ca628005cc6f51e043.zip |
net: ipconfig: drop inter-device timeout
Now that ipconfig learned to handle "delayed replies" in the previous
commit, there is no reason any more to delay sending a first request per
device.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipconfig.c')
-rw-r--r-- | net/ipv4/ipconfig.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 5af6736bd384..42cf629357b5 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -85,7 +85,6 @@ /* Define the timeout for waiting for a DHCP/BOOTP/RARP reply */ #define CONF_OPEN_RETRIES 2 /* (Re)open devices twice */ #define CONF_SEND_RETRIES 6 /* Send six requests per open */ -#define CONF_INTER_TIMEOUT (HZ) /* Inter-device timeout: 1 second */ #define CONF_BASE_TIMEOUT (HZ*2) /* Initial timeout: 2 seconds */ #define CONF_TIMEOUT_RANDOM (HZ) /* Maximum amount of randomization */ #define CONF_TIMEOUT_MULT *7/4 /* Rate of timeout growth */ @@ -1225,9 +1224,11 @@ static int __init ic_dynamic(void) ic_rarp_send_if(d); #endif - jiff = jiffies + (d->next ? CONF_INTER_TIMEOUT : timeout); - while (time_before(jiffies, jiff) && !ic_got_reply) - schedule_timeout_uninterruptible(1); + if (!d->next) { + jiff = jiffies + timeout; + while (time_before(jiffies, jiff) && !ic_got_reply) + schedule_timeout_uninterruptible(1); + } #ifdef IPCONFIG_DHCP /* DHCP isn't done until we get a DHCPACK. */ if ((ic_got_reply & IC_BOOTP) && |