]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/VirtioNetDxe/SnpGetStatus.c
SecurityPkg: Add TPM PTP support in TCG2 SMM.
[mirror_edk2.git] / OvmfPkg / VirtioNetDxe / SnpGetStatus.c
index adb57cf8fe5cdd43f8bd4fbd151702ba9eccb11d..694940ea1d976827bd890a734cb5e154b02a2470 100644 (file)
@@ -4,7 +4,7 @@
   any.\r
 \r
   Copyright (C) 2013, Red Hat, Inc.\r
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2014, Intel Corporation. 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
@@ -90,11 +90,12 @@ VirtioNetGetStatus (
   if (Dev->Snm.MediaPresentSupported) {\r
     UINT16 LinkStatus;\r
 \r
-    Status = VIRTIO_CFG_READ (Dev, VhdrLinkStatus, &LinkStatus);\r
+    Status = VIRTIO_CFG_READ (Dev, LinkStatus, &LinkStatus);\r
     if (EFI_ERROR (Status)) {\r
       goto Exit;\r
     }\r
-    Dev->Snm.MediaPresent = !!(LinkStatus & VIRTIO_NET_S_LINK_UP);\r
+    Dev->Snm.MediaPresent =\r
+      (BOOLEAN) ((LinkStatus & VIRTIO_NET_S_LINK_UP) != 0);\r
   }\r
 \r
   //\r