2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-11-28 12:19:46 +00:00

[linux] Apply MAC address prior to registering network device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2013-09-01 17:38:40 +01:00
parent 0f787df284
commit 8a2dc7a588

View File

@ -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: