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:
Michael Brown
2007-07-02 17:43:32 +01:00
parent 8febe42f78
commit 5f17089b14
7 changed files with 64 additions and 57 deletions
+14 -2
View File
@@ -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 */