]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/VirtioNetDxe/SnpReceive.c
OvmfPkg: Make the VirtIo devices use the new VIRTIO_DEVICE_PROTOCOL
[mirror_edk2.git] / OvmfPkg / VirtioNetDxe / SnpReceive.c
index 87c6ca9b4ba456d69d00c05173c36dbdfea88600..99abd7ebe454dde610296f665b12cf3c7b1cd6a7 100644 (file)
@@ -147,14 +147,14 @@ VirtioNetReceive (
   CopyMem (Buffer, RxPtr, RxLen);\r
 \r
   if (DestAddr != NULL) {\r
-    CopyMem (DestAddr, RxPtr, SIZE_OF_VNET (VhdrMac));\r
+    CopyMem (DestAddr, RxPtr, SIZE_OF_VNET (Mac));\r
   }\r
-  RxPtr += SIZE_OF_VNET (VhdrMac);\r
+  RxPtr += SIZE_OF_VNET (Mac);\r
 \r
   if (SrcAddr != NULL) {\r
-    CopyMem (SrcAddr, RxPtr, SIZE_OF_VNET (VhdrMac));\r
+    CopyMem (SrcAddr, RxPtr, SIZE_OF_VNET (Mac));\r
   }\r
-  RxPtr += SIZE_OF_VNET (VhdrMac);\r
+  RxPtr += SIZE_OF_VNET (Mac);\r
 \r
   if (Protocol != NULL) {\r
     *Protocol = (UINT16) ((RxPtr[0] << 8) | RxPtr[1]);\r
@@ -177,9 +177,7 @@ RecycleDesc:
   *Dev->RxRing.Avail.Idx = AvailIdx;\r
 \r
   MemoryFence ();\r
-  NotifyStatus = VIRTIO_CFG_WRITE (Dev, Generic.VhdrQueueNotify,\r
-                   VIRTIO_NET_Q_RX);\r
-\r
+  NotifyStatus = Dev->VirtIo->SetQueueNotify (Dev->VirtIo, VIRTIO_NET_Q_RX);\r
   if (!EFI_ERROR (Status)) { // earlier error takes precedence\r
     Status = NotifyStatus;\r
   }\r