iPXE
snp.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Michael Brown <mbrown@fensystems.co.uk>.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of the
7  * License, or any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  * 02110-1301, USA.
18  *
19  * You can also choose to distribute this program under the terms of
20  * the Unmodified Binary Distribution Licence (as given in the file
21  * COPYING.UBDL), provided that you have satisfied its requirements.
22  */
23 
24 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
25 
26 #include <ipxe/efi/efi.h>
27 #include <ipxe/efi/efi_driver.h>
28 #include "snpnet.h"
29 #include "nii.h"
30 
31 /** @file
32  *
33  * SNP driver
34  *
35  */
36 
37 /**
38  * Check to see if driver supports a device
39  *
40  * @v device EFI device handle
41  * @ret rc Return status code
42  */
44 
46 }
47 
48 /**
49  * Check to see if driver supports a device
50  *
51  * @v device EFI device handle
52  * @ret rc Return status code
53  */
55 
57 }
58 
59 /** EFI SNP driver */
60 struct efi_driver snp_driver __efi_driver ( EFI_DRIVER_NORMAL ) = {
61  .name = "SNP",
62  .supported = snp_supported,
63  .start = snpnet_start,
64  .stop = snpnet_stop,
65 };
66 
67 /** EFI NII driver */
68 struct efi_driver nii_driver __efi_driver ( EFI_DRIVER_NORMAL ) = {
69  .name = "NII",
70  .supported = nii_supported,
71  .start = nii_start,
72  .stop = nii_stop,
73 };
EFI_GUID efi_nii31_protocol_guid
Network interface identifier protocol GUID (new version)
Definition: efi_guid.c:279
NII driver.
EFI driver interface.
int snpnet_supported(EFI_HANDLE device, EFI_GUID *protocol)
Check to see if driver supports a device.
Definition: snpnet.c:495
struct efi_driver snp_driver __efi_driver(EFI_DRIVER_NORMAL)
EFI SNP driver.
int nii_start(struct efi_device *efidev)
Attach driver to device.
Definition: nii.c:1272
void snpnet_stop(struct efi_device *efidev)
Detach driver from device.
Definition: snpnet.c:658
EFI_GUID efi_simple_network_protocol_guid
Simple network protocol GUID.
Definition: efi_guid.c:307
void nii_stop(struct efi_device *efidev)
Detach driver from device.
Definition: nii.c:1391
static int snp_supported(EFI_HANDLE device)
Check to see if driver supports a device.
Definition: snp.c:43
int snpnet_start(struct efi_device *efidev)
Attach driver to device.
Definition: snpnet.c:541
A hardware device.
Definition: device.h:73
SNP NIC driver.
static int nii_supported(EFI_HANDLE device)
Check to see if driver supports a device.
Definition: snp.c:54
EFI API.
An EFI driver.
Definition: efi_driver.h:33
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
const char * name
Name.
Definition: efi_driver.h:35
Definition: efi.h:59
#define EFI_DRIVER_NORMAL
Normal drivers.
Definition: efi_driver.h:65