[netdevice] Call netdev_link_[up|down|err]() only while registered

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2010-09-05 02:03:31 +01:00
parent 3950d1d8e6
commit 97ef28aea0
20 changed files with 50 additions and 54 deletions

View File

@@ -803,12 +803,12 @@ int e1000_probe ( struct pci_device *pdev,
/* reset the hardware with the new settings */
e1000_reset ( adapter );
/* Mark as link up; we don't yet handle link state */
netdev_link_up ( netdev );
if ( ( err = register_netdev ( netdev ) ) != 0)
goto err_register;
/* Mark as link up; we don't yet handle link state */
netdev_link_up ( netdev );
for (i = 0; i < 6; i++)
DBG ("%02x%s", netdev->ll_addr[i], i == 5 ? "\n" : ":");