]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/VirtioNetDxe/SnpTransmit.c
OvmfPkg/XenBusDxe: Fix build issue with VS2010
[mirror_edk2.git] / OvmfPkg / VirtioNetDxe / SnpTransmit.c
index 5bfb807edc7dc152239c96a324869fd182ac512a..7ca40d5d06504b75e870aeab68c33cf3d9f047fc 100644 (file)
@@ -3,7 +3,7 @@
   Implementation of the SNP.Transmit() function and its private helpers if any.\r
 \r
   Copyright (C) 2013, Red Hat, Inc.\r
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2013, 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
@@ -127,20 +127,20 @@ VirtioNetTransmit (
       goto Exit;\r
     }\r
     Ptr = Buffer;\r
-    ASSERT (SIZE_OF_VNET (VhdrMac) <= sizeof (EFI_MAC_ADDRESS));\r
+    ASSERT (SIZE_OF_VNET (Mac) <= sizeof (EFI_MAC_ADDRESS));\r
 \r
-    CopyMem (Ptr, DestAddr, SIZE_OF_VNET (VhdrMac));\r
-    Ptr += SIZE_OF_VNET (VhdrMac);\r
+    CopyMem (Ptr, DestAddr, SIZE_OF_VNET (Mac));\r
+    Ptr += SIZE_OF_VNET (Mac);\r
 \r
     CopyMem (Ptr,\r
       (SrcAddr == NULL) ? &Dev->Snm.CurrentAddress : SrcAddr,\r
-      SIZE_OF_VNET (VhdrMac));\r
-    Ptr += SIZE_OF_VNET (VhdrMac);\r
+      SIZE_OF_VNET (Mac));\r
+    Ptr += SIZE_OF_VNET (Mac);\r
 \r
     *Ptr++ = (UINT8) (*Protocol >> 8);\r
     *Ptr++ = (UINT8) *Protocol;\r
 \r
-    ASSERT (Ptr - (UINT8 *) Buffer == Dev->Snm.MediaHeaderSize);\r
+    ASSERT ((UINTN) (Ptr - (UINT8 *) Buffer) == Dev->Snm.MediaHeaderSize);\r
   }\r
 \r
   //\r
@@ -161,7 +161,7 @@ VirtioNetTransmit (
   *Dev->TxRing.Avail.Idx = AvailIdx;\r
 \r
   MemoryFence ();\r
-  Status = VIRTIO_CFG_WRITE (Dev, Generic.VhdrQueueNotify, VIRTIO_NET_Q_TX);\r
+  Status = Dev->VirtIo->SetQueueNotify (Dev->VirtIo, VIRTIO_NET_Q_TX);\r
 \r
 Exit:\r
   gBS->RestoreTPL (OldTpl);\r