Commit e0688534 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by David S. Miller

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2647cffb
...@@ -85,7 +85,6 @@ ...@@ -85,7 +85,6 @@
/* Define the timeout for waiting for a DHCP/BOOTP/RARP reply */ /* Define the timeout for waiting for a DHCP/BOOTP/RARP reply */
#define CONF_OPEN_RETRIES 2 /* (Re)open devices twice */ #define CONF_OPEN_RETRIES 2 /* (Re)open devices twice */
#define CONF_SEND_RETRIES 6 /* Send six requests per open */ #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_BASE_TIMEOUT (HZ*2) /* Initial timeout: 2 seconds */
#define CONF_TIMEOUT_RANDOM (HZ) /* Maximum amount of randomization */ #define CONF_TIMEOUT_RANDOM (HZ) /* Maximum amount of randomization */
#define CONF_TIMEOUT_MULT *7/4 /* Rate of timeout growth */ #define CONF_TIMEOUT_MULT *7/4 /* Rate of timeout growth */
...@@ -1225,9 +1224,11 @@ static int __init ic_dynamic(void) ...@@ -1225,9 +1224,11 @@ static int __init ic_dynamic(void)
ic_rarp_send_if(d); ic_rarp_send_if(d);
#endif #endif
jiff = jiffies + (d->next ? CONF_INTER_TIMEOUT : timeout); if (!d->next) {
while (time_before(jiffies, jiff) && !ic_got_reply) jiff = jiffies + timeout;
schedule_timeout_uninterruptible(1); while (time_before(jiffies, jiff) && !ic_got_reply)
schedule_timeout_uninterruptible(1);
}
#ifdef IPCONFIG_DHCP #ifdef IPCONFIG_DHCP
/* DHCP isn't done until we get a DHCPACK. */ /* DHCP isn't done until we get a DHCPACK. */
if ((ic_got_reply & IC_BOOTP) && if ((ic_got_reply & IC_BOOTP) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment