Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
mcb30 committed Apr 21, 2012
1 parent 38d2ad8 commit 44d5ef9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/usr/ifmgmt.c
Expand Up @@ -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;

Expand Down

0 comments on commit 44d5ef9

Please sign in to comment.