mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-22 17:41:55 +00:00
[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>
This commit is contained in:
parent
38d2ad8676
commit
44d5ef9d7d
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user