소스 검색

[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…
취소
저장