mirror of
https://github.com/ipxe/ipxe
synced 2025-12-15 00:12:19 +03:00
pxe_netdev now holds a reference to the network device.
Use generic fields in struct device_description rather than assuming that the struct device * is contained within a pci_device or isapnp_device; this assumption is broken when using the undionly driver. Add PXENV_UNDI_SET_STATION_ADDRESS.
This commit is contained in:
@@ -40,6 +40,7 @@ struct image_type pxe_image_type __image_type ( PROBE_PXE );
|
||||
*/
|
||||
static int pxe_exec ( struct image *image __unused ) {
|
||||
struct net_device *netdev;
|
||||
int rc;
|
||||
|
||||
/* Ensure that PXE stack is ready to use */
|
||||
pxe_init_structures();
|
||||
@@ -47,11 +48,18 @@ static int pxe_exec ( struct image *image __unused ) {
|
||||
|
||||
/* Arbitrarily pick the first open network device to use for PXE */
|
||||
for_each_netdev ( netdev ) {
|
||||
pxe_netdev = netdev;
|
||||
pxe_set_netdev ( netdev );
|
||||
break;
|
||||
}
|
||||
|
||||
return pxe_start_nbp();
|
||||
/* Start PXE NBP */
|
||||
rc = pxe_start_nbp();
|
||||
|
||||
/* Deactivate PXE */
|
||||
pxe_set_netdev ( NULL );
|
||||
pxe_unhook_int1a();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user