提交 cd7816d1 编写于 作者: G Gerlando Falauto 提交者: David S. Miller

net: have ipconfig not wait if no dev is available

previous commit 3fb72f1e
makes IP-Config wait for carrier on at least one network device.

Before waiting (predefined value 120s), check that at least one device
was successfully brought up. Otherwise (e.g. buggy bootloader
which does not set the MAC address) there is no point in waiting
for carrier.

Cc: Micha Nelissen <micha@neli.hopto.org>
Cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: NGerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a76c0adf
...@@ -253,6 +253,10 @@ static int __init ic_open_devs(void) ...@@ -253,6 +253,10 @@ static int __init ic_open_devs(void)
} }
} }
/* no point in waiting if we could not bring up at least one device */
if (!ic_first_dev)
goto have_carrier;
/* wait for a carrier on at least one device */ /* wait for a carrier on at least one device */
start = jiffies; start = jiffies;
while (jiffies - start < msecs_to_jiffies(CONF_CARRIER_TIMEOUT)) { while (jiffies - start < msecs_to_jiffies(CONF_CARRIER_TIMEOUT)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册