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