1 | /** @file
|
---|
2 |
|
---|
3 | Empty implementation of the SNP methods that dependent protocols don't
|
---|
4 | absolutely need and the UEFI-2.3.1+errC specification allows us not to
|
---|
5 | support.
|
---|
6 |
|
---|
7 | Copyright (C) 2013, Red Hat, Inc.
|
---|
8 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
---|
9 |
|
---|
10 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
11 |
|
---|
12 | **/
|
---|
13 |
|
---|
14 | #include "VirtioNet.h"
|
---|
15 |
|
---|
16 | /**
|
---|
17 | Resets a network adapter and re-initializes it with the parameters that were
|
---|
18 | provided in the previous call to Initialize().
|
---|
19 |
|
---|
20 | @param This The protocol instance pointer.
|
---|
21 | @param ExtendedVerification Indicates that the driver may perform a more
|
---|
22 | exhaustive verification operation of the device
|
---|
23 | during reset.
|
---|
24 |
|
---|
25 | @retval EFI_SUCCESS The network interface was reset.
|
---|
26 | @retval EFI_NOT_STARTED The network interface has not been started.
|
---|
27 | @retval EFI_INVALID_PARAMETER One or more of the parameters has an
|
---|
28 | unsupported value.
|
---|
29 | @retval EFI_DEVICE_ERROR The command could not be sent to the network
|
---|
30 | interface.
|
---|
31 | @retval EFI_UNSUPPORTED This function is not supported by the network
|
---|
32 | interface.
|
---|
33 |
|
---|
34 | **/
|
---|
35 |
|
---|
36 | EFI_STATUS
|
---|
37 | EFIAPI
|
---|
38 | VirtioNetReset (
|
---|
39 | IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
---|
40 | IN BOOLEAN ExtendedVerification
|
---|
41 | )
|
---|
42 | {
|
---|
43 | return EFI_UNSUPPORTED;
|
---|
44 | }
|
---|
45 |
|
---|
46 |
|
---|
47 | /**
|
---|
48 | Modifies or resets the current station address, if supported.
|
---|
49 |
|
---|
50 | @param This The protocol instance pointer.
|
---|
51 | @param Reset Flag used to reset the station address to the network
|
---|
52 | interfaces permanent address.
|
---|
53 | @param New The new station address to be used for the network interface.
|
---|
54 |
|
---|
55 | @retval EFI_SUCCESS The network interfaces station address was
|
---|
56 | updated.
|
---|
57 | @retval EFI_NOT_STARTED The network interface has not been started.
|
---|
58 | @retval EFI_INVALID_PARAMETER One or more of the parameters has an
|
---|
59 | unsupported value.
|
---|
60 | @retval EFI_DEVICE_ERROR The command could not be sent to the network
|
---|
61 | interface.
|
---|
62 | @retval EFI_UNSUPPORTED This function is not supported by the network
|
---|
63 | interface.
|
---|
64 |
|
---|
65 | **/
|
---|
66 |
|
---|
67 | EFI_STATUS
|
---|
68 | EFIAPI
|
---|
69 | VirtioNetStationAddress (
|
---|
70 | IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
---|
71 | IN BOOLEAN Reset,
|
---|
72 | IN EFI_MAC_ADDRESS *New OPTIONAL
|
---|
73 | )
|
---|
74 | {
|
---|
75 | return EFI_UNSUPPORTED;
|
---|
76 | }
|
---|
77 |
|
---|
78 |
|
---|
79 | /**
|
---|
80 | Resets or collects the statistics on a network interface.
|
---|
81 |
|
---|
82 | @param This Protocol instance pointer.
|
---|
83 | @param Reset Set to TRUE to reset the statistics for the network
|
---|
84 | interface.
|
---|
85 | @param StatisticsSize On input the size, in bytes, of StatisticsTable. On
|
---|
86 | output the size, in bytes, of the resulting table of
|
---|
87 | statistics.
|
---|
88 | @param StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure
|
---|
89 | that contains the statistics.
|
---|
90 |
|
---|
91 | @retval EFI_SUCCESS The statistics were collected from the network
|
---|
92 | interface.
|
---|
93 | @retval EFI_NOT_STARTED The network interface has not been started.
|
---|
94 | @retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The
|
---|
95 | current buffer size needed to hold the
|
---|
96 | statistics is returned in StatisticsSize.
|
---|
97 | @retval EFI_INVALID_PARAMETER One or more of the parameters has an
|
---|
98 | unsupported value.
|
---|
99 | @retval EFI_DEVICE_ERROR The command could not be sent to the network
|
---|
100 | interface.
|
---|
101 | @retval EFI_UNSUPPORTED This function is not supported by the network
|
---|
102 | interface.
|
---|
103 |
|
---|
104 | **/
|
---|
105 |
|
---|
106 | EFI_STATUS
|
---|
107 | EFIAPI
|
---|
108 | VirtioNetStatistics (
|
---|
109 | IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
---|
110 | IN BOOLEAN Reset,
|
---|
111 | IN OUT UINTN *StatisticsSize OPTIONAL,
|
---|
112 | OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
|
---|
113 | )
|
---|
114 | {
|
---|
115 | return EFI_UNSUPPORTED;
|
---|
116 | }
|
---|
117 |
|
---|
118 |
|
---|
119 | /**
|
---|
120 | Performs read and write operations on the NVRAM device attached to a network
|
---|
121 | interface.
|
---|
122 |
|
---|
123 | @param This The protocol instance pointer.
|
---|
124 | @param ReadWrite TRUE for read operations, FALSE for write operations.
|
---|
125 | @param Offset Byte offset in the NVRAM device at which to start the read
|
---|
126 | or write operation. This must be a multiple of
|
---|
127 | NvRamAccessSize and less than NvRamSize.
|
---|
128 | @param BufferSize The number of bytes to read or write from the NVRAM
|
---|
129 | device. This must also be a multiple of NvramAccessSize.
|
---|
130 | @param Buffer A pointer to the data buffer.
|
---|
131 |
|
---|
132 | @retval EFI_SUCCESS The NVRAM access was performed.
|
---|
133 | @retval EFI_NOT_STARTED The network interface has not been started.
|
---|
134 | @retval EFI_INVALID_PARAMETER One or more of the parameters has an
|
---|
135 | unsupported value.
|
---|
136 | @retval EFI_DEVICE_ERROR The command could not be sent to the network
|
---|
137 | interface.
|
---|
138 | @retval EFI_UNSUPPORTED This function is not supported by the network
|
---|
139 | interface.
|
---|
140 |
|
---|
141 | **/
|
---|
142 |
|
---|
143 | EFI_STATUS
|
---|
144 | EFIAPI
|
---|
145 | VirtioNetNvData (
|
---|
146 | IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
---|
147 | IN BOOLEAN ReadWrite,
|
---|
148 | IN UINTN Offset,
|
---|
149 | IN UINTN BufferSize,
|
---|
150 | IN OUT VOID *Buffer
|
---|
151 | )
|
---|
152 | {
|
---|
153 | return EFI_UNSUPPORTED;
|
---|
154 | }
|
---|