X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=OvmfPkg%2FVirtioNetDxe%2FSnpReceive.c;h=99abd7ebe454dde610296f665b12cf3c7b1cd6a7;hb=f8daac8121e66c46d3374f63f80308a777c2a2e7;hp=87c6ca9b4ba456d69d00c05173c36dbdfea88600;hpb=dc9447bd3777614529b711c9976979fe61822ba8;p=mirror_edk2.git diff --git a/OvmfPkg/VirtioNetDxe/SnpReceive.c b/OvmfPkg/VirtioNetDxe/SnpReceive.c index 87c6ca9b4b..99abd7ebe4 100644 --- a/OvmfPkg/VirtioNetDxe/SnpReceive.c +++ b/OvmfPkg/VirtioNetDxe/SnpReceive.c @@ -147,14 +147,14 @@ VirtioNetReceive ( CopyMem (Buffer, RxPtr, RxLen); if (DestAddr != NULL) { - CopyMem (DestAddr, RxPtr, SIZE_OF_VNET (VhdrMac)); + CopyMem (DestAddr, RxPtr, SIZE_OF_VNET (Mac)); } - RxPtr += SIZE_OF_VNET (VhdrMac); + RxPtr += SIZE_OF_VNET (Mac); if (SrcAddr != NULL) { - CopyMem (SrcAddr, RxPtr, SIZE_OF_VNET (VhdrMac)); + CopyMem (SrcAddr, RxPtr, SIZE_OF_VNET (Mac)); } - RxPtr += SIZE_OF_VNET (VhdrMac); + RxPtr += SIZE_OF_VNET (Mac); if (Protocol != NULL) { *Protocol = (UINT16) ((RxPtr[0] << 8) | RxPtr[1]); @@ -177,9 +177,7 @@ RecycleDesc: *Dev->RxRing.Avail.Idx = AvailIdx; MemoryFence (); - NotifyStatus = VIRTIO_CFG_WRITE (Dev, Generic.VhdrQueueNotify, - VIRTIO_NET_Q_RX); - + NotifyStatus = Dev->VirtIo->SetQueueNotify (Dev->VirtIo, VIRTIO_NET_Q_RX); if (!EFI_ERROR (Status)) { // earlier error takes precedence Status = NotifyStatus; }