Преглед на файлове

[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 години
родител
ревизия
44d5ef9d7d
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3
    0
      src/usr/ifmgmt.c

+ 3
- 0
src/usr/ifmgmt.c Целия файл

@@ -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…
Отказ
Запис