From: Michael Brown Date: Sat, 21 Apr 2012 15:25:55 +0000 (+0100) Subject: [netdevice] Allow network device to update link state before checking X-Git-Tag: v1.20.1~1834 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44d5ef9d7d525edf4c9d8c7a5b8b09f6eb4143b9;p=thirdparty%2Fipxe.git [netdevice] Allow network device to update link state before checking If the network interface has only just been opened (e.g. by the "dhcp" command) then we should allow at least one opportunity for the card to update the link state before testing it, to avoid false positives. Signed-off-by: Michael Brown --- diff --git a/src/usr/ifmgmt.c b/src/usr/ifmgmt.c index 049851596..8ee311c0f 100644 --- a/src/usr/ifmgmt.c +++ b/src/usr/ifmgmt.c @@ -113,6 +113,9 @@ int iflinkwait ( struct net_device *netdev, unsigned int max_wait_ms ) { int key; int rc; + /* Allow link state to be updated */ + netdev_poll ( netdev ); + if ( netdev_link_ok ( netdev ) ) return 0;