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:
+14
-2
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user