diff options
| author | Michael Brown | 2007-07-02 18:43:32 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-07-02 18:43:32 +0200 |
| commit | 5f17089b148211dd8667af4efa9302a1f46dbc49 (patch) | |
| tree | 0d131e90f9b7d2ebdc9422e3d5bd24ff31dd0d98 /src/interface/pxe/pxe.c | |
| parent | Build bochs with ne2000 support, and add sample lines in bochsrc.txt (diff) | |
| download | ipxe-5f17089b148211dd8667af4efa9302a1f46dbc49.tar.gz ipxe-5f17089b148211dd8667af4efa9302a1f46dbc49.tar.xz ipxe-5f17089b148211dd8667af4efa9302a1f46dbc49.zip | |
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.
Diffstat (limited to 'src/interface/pxe/pxe.c')
| -rw-r--r-- | src/interface/pxe/pxe.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/interface/pxe/pxe.c b/src/interface/pxe/pxe.c index 8aa7df0d7..5e67758bc 100644 --- a/src/interface/pxe/pxe.c +++ b/src/interface/pxe/pxe.c @@ -22,12 +22,24 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "dev.h" +#include <gpxe/netdevice.h> #include "pxe.h" -#warning "pxe_netdev should hold a persistent reference to the net device" struct net_device *pxe_netdev = NULL; +/** + * Set network device as current PXE network device + * + * @v netdev Network device, or NULL + */ +void pxe_set_netdev ( struct net_device *netdev ) { + if ( pxe_netdev ) + netdev_put ( pxe_netdev ); + pxe_netdev = NULL; + if ( netdev ) + pxe_netdev = netdev_get ( netdev ); +} + #if 0 /* Global pointer to currently installed PXE stack */ |
