diff options
author | Michael Brown | 2013-09-01 18:38:40 +0200 |
---|---|---|
committer | Michael Brown | 2013-09-03 03:02:58 +0200 |
commit | 8a2dc7a58807bd3106cb4aed83623ed39f9b328f (patch) | |
tree | 0cb680668e558172614f7c9adfcc9f016719a385 /src/drivers/linux | |
parent | [ethernet] Add support for generating multicast hash for IPv6 addresses (diff) | |
download | ipxe-8a2dc7a58807bd3106cb4aed83623ed39f9b328f.tar.gz ipxe-8a2dc7a58807bd3106cb4aed83623ed39f9b328f.tar.xz ipxe-8a2dc7a58807bd3106cb4aed83623ed39f9b328f.zip |
[linux] Apply MAC address prior to registering network device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/linux')
-rw-r--r-- | src/drivers/linux/tap.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/drivers/linux/tap.c b/src/drivers/linux/tap.c index 99937d74..97943665 100644 --- a/src/drivers/linux/tap.c +++ b/src/drivers/linux/tap.c @@ -200,11 +200,6 @@ static int tap_probe(struct linux_device *device, struct linux_device_request *r netdev->dev = &device->dev; memset(nic, 0, sizeof(*nic)); - if ((rc = register_netdev(netdev)) != 0) - goto err_register; - - netdev_link_up(netdev); - /* Look for the mandatory if setting */ if_setting = linux_find_setting("if", &request->settings); @@ -224,6 +219,12 @@ static int tap_probe(struct linux_device *device, struct linux_device_request *r /* Apply rest of the settings */ linux_apply_settings(&request->settings, &netdev->settings.settings); + /* Register network device */ + if ((rc = register_netdev(netdev)) != 0) + goto err_register; + + netdev_link_up(netdev); + return 0; err_settings: |