Browse Source

[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>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
44d5ef9d7d
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/usr/ifmgmt.c

+ 3
- 0
src/usr/ifmgmt.c View File

@@ -113,6 +113,9 @@ int iflinkwait ( struct net_device *netdev, unsigned int max_wait_ms ) {
113 113
 	int key;
114 114
 	int rc;
115 115
 
116
+	/* Allow link state to be updated */
117
+	netdev_poll ( netdev );
118
+
116 119
 	if ( netdev_link_ok ( netdev ) )
117 120
 		return 0;
118 121
 

Loading…
Cancel
Save