]>
Commit | Line | Data |
---|---|---|
12384f9b LE |
1 | /** @file\r |
2 | \r | |
3 | Helper functions used by at least two Simple Network Protocol methods.\r | |
4 | \r | |
5 | Copyright (C) 2013, Red Hat, Inc.\r | |
6 | \r | |
7 | This program and the accompanying materials are licensed and made available\r | |
8 | under the terms and conditions of the BSD License which accompanies this\r | |
9 | distribution. The full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r | |
13 | WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #include <Library/MemoryAllocationLib.h>\r | |
18 | \r | |
19 | #include "VirtioNet.h"\r | |
20 | \r | |
21 | /**\r | |
22 | Release RX and TX resources on the boundary of the\r | |
23 | EfiSimpleNetworkInitialized state.\r | |
24 | \r | |
25 | These functions contribute to rolling back a partial, failed initialization\r | |
26 | of the virtio-net SNP driver instance, or to shutting down a fully\r | |
27 | initialized, running instance.\r | |
28 | \r | |
29 | They are only callable by the VirtioNetInitialize() and the\r | |
30 | VirtioNetShutdown() SNP methods. See the state diagram in "VirtioNet.h".\r | |
31 | \r | |
32 | @param[in,out] Dev The VNET_DEV driver instance being shut down, or whose\r | |
33 | partial, failed initialization is being rolled back.\r | |
34 | */\r | |
35 | \r | |
36 | VOID\r | |
37 | EFIAPI\r | |
38 | VirtioNetShutdownRx (\r | |
39 | IN OUT VNET_DEV *Dev\r | |
40 | )\r | |
41 | {\r | |
42 | FreePool (Dev->RxBuf);\r | |
43 | }\r | |
44 | \r | |
45 | \r | |
46 | VOID\r | |
47 | EFIAPI\r | |
48 | VirtioNetShutdownTx (\r | |
49 | IN OUT VNET_DEV *Dev\r | |
50 | )\r | |
51 | {\r | |
52 | FreePool (Dev->TxFreeStack);\r | |
53 | }\r |