struct dhcp p = {};
/*
- * Fill ethernet header
+ * Fill Ethernet header
*/
boottime->copy_mem(p.eth_hdr.et_dest, (void *)BROADCAST_MAC, ARP_HLEN);
boottime->copy_mem(p.eth_hdr.et_src, &net->mode->current_address,
return EFI_ST_FAILURE;
}
/*
- * Initialize network adapter.
+ * Start network adapter.
*/
- ret = net->initialize(net, 0, 0);
- if (ret != EFI_SUCCESS) {
- efi_st_error("Failed to initialize network adapter\n");
+ ret = net->start(net);
+ if (ret != EFI_SUCCESS && ret != EFI_ALREADY_STARTED) {
+ efi_st_error("Failed to start network adapter\n");
return EFI_ST_FAILURE;
}
/*
- * Start network adapter.
+ * Initialize network adapter.
*/
- ret = net->start(net);
+ ret = net->initialize(net, 0, 0);
if (ret != EFI_SUCCESS) {
- efi_st_error("Failed to start network adapter\n");
+ efi_st_error("Failed to initialize network adapter\n");
return EFI_ST_FAILURE;
}
return EFI_ST_SUCCESS;