summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/efi/snpnet.c
diff options
context:
space:
mode:
authorMichael Brown2010-09-05 03:03:31 +0200
committerMichael Brown2010-09-05 03:51:46 +0200
commit97ef28aea070f6d07b85fe16ef1b98da94a9f609 (patch)
tree80011445483aed4e257d449f796bd1cb24e3c60d /src/drivers/net/efi/snpnet.c
parent[sis190] Initialise network device before calling register_netdev() (diff)
downloadipxe-97ef28aea070f6d07b85fe16ef1b98da94a9f609.tar.gz
ipxe-97ef28aea070f6d07b85fe16ef1b98da94a9f609.tar.xz
ipxe-97ef28aea070f6d07b85fe16ef1b98da94a9f609.zip
[netdevice] Call netdev_link_[up|down|err]() only while registered
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/efi/snpnet.c')
-rw-r--r--src/drivers/net/efi/snpnet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/net/efi/snpnet.c b/src/drivers/net/efi/snpnet.c
index ba63a01d..b725d407 100644
--- a/src/drivers/net/efi/snpnet.c
+++ b/src/drivers/net/efi/snpnet.c
@@ -300,13 +300,13 @@ int snpnet_probe ( struct snp_device *snpdev ) {
memcpy ( netdev->hw_addr, snp->Mode->PermanentAddress.Addr,
snp->Mode->HwAddressSize );
- /* Mark as link up; we don't handle link state */
- netdev_link_up ( netdev );
-
/* Register network device */
if ( ( rc = register_netdev ( netdev ) ) != 0 )
goto err_register;
+ /* Mark as link up; we don't handle link state */
+ netdev_link_up ( netdev );
+
DBGC ( snp, "SNP %p added\n", snp );
return 0;