]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/VirtioNetDxe/SnpShutdown.c
IntelFsp2Pkg/SplitFspBin.py: Support rebasing 1.x binary.
[mirror_edk2.git] / OvmfPkg / VirtioNetDxe / SnpShutdown.c
index 42aeca1676c7308707c0a58df794eada10de22ab..a217b8379910e4aaea23edd8427f3dc7d82ccc8b 100644 (file)
@@ -4,14 +4,9 @@
 \r
   Copyright (C) 2013, Red Hat, Inc.\r
   Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2017, AMD Inc, All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials are licensed and made available\r
-  under the terms and conditions of the BSD License which accompanies this\r
-  distribution. The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
-  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -63,11 +58,11 @@ VirtioNetShutdown (
     break;\r
   }\r
 \r
-  VIRTIO_CFG_WRITE (Dev, Generic.VhdrDeviceStatus, 0);\r
+  Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0);\r
   VirtioNetShutdownRx (Dev);\r
   VirtioNetShutdownTx (Dev);\r
-  VirtioRingUninit (&Dev->TxRing);\r
-  VirtioRingUninit (&Dev->RxRing);\r
+  VirtioNetUninitRing (Dev, &Dev->TxRing, Dev->TxRingMap);\r
+  VirtioNetUninitRing (Dev, &Dev->RxRing, Dev->RxRingMap);\r
 \r
   Dev->Snm.State = EfiSimpleNetworkStarted;\r
   Status = EFI_SUCCESS;\r