[efi] Allow network devices to be created on top of arbitrary SNP devices

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2014-07-03 15:28:17 +01:00
parent cb2f6ca46f
commit c7051d826b
11 changed files with 653 additions and 407 deletions
+7 -8
View File
@@ -28,22 +28,21 @@
FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/device.h>
#include <ipxe/netdevice.h>
#include <ipxe/efi/efi.h>
#include <ipxe/efi/Protocol/SimpleNetwork.h>
/** A network device that consumes the EFI Simple Network Protocol */
/** An SNP device */
struct snp_device {
/** Underlying simple network protocol instance */
/** EFI device */
struct efi_device *efidev;
/** Simple network protocol */
EFI_SIMPLE_NETWORK_PROTOCOL *snp;
/** Generic device */
struct device dev;
/** Network device */
struct net_device *netdev;
/** State to put the snp in when removing the device */
uint32 removal_state;
/** State to restore when removing the device */
UINT32 removal_state;
};
#endif /* _SNP_H */