mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
net: have ipconfig not wait if no dev is available
[ Upstream commitcd7816d149] previous commit3fb72f1e6emakes 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: Gerlando Falauto <gerlando.falauto@keymile.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
477a897533
commit
9ec14c04ec
@@ -252,6 +252,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 */
|
||||
start = jiffies;
|
||||
while (jiffies - start < msecs_to_jiffies(CONF_CARRIER_TIMEOUT)) {
|
||||
|
||||
Reference in New Issue
Block a user