diff options
author | Michael Brown <mcb30@ipxe.org> | 2012-04-21 16:25:55 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-04-21 16:28:29 +0100 |
commit | 44d5ef9d7d525edf4c9d8c7a5b8b09f6eb4143b9 (patch) | |
tree | 11763fdabecb548b37c2e1ceb91f8a636c79fc57 /src/usr | |
parent | 38d2ad8676cc83e041318b9ec60d0652edcf3c44 (diff) | |
download | ipxe-44d5ef9d7d525edf4c9d8c7a5b8b09f6eb4143b9.zip ipxe-44d5ef9d7d525edf4c9d8c7a5b8b09f6eb4143b9.tar.gz ipxe-44d5ef9d7d525edf4c9d8c7a5b8b09f6eb4143b9.tar.bz2 |
[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 <mcb30@ipxe.org>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/ifmgmt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/usr/ifmgmt.c b/src/usr/ifmgmt.c index 0498515..8ee311c 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; |