]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/VirtioNetDxe/SnpSharedHelpers.c
OvmfPkg/VirtioNetDxe: alloc RxBuf using AllocateSharedPages()
[mirror_edk2.git] / OvmfPkg / VirtioNetDxe / SnpSharedHelpers.c
index 57c7395848bd2d21c61abb0c0475783725cb05c5..ee4f9ed36ecdaee26fc7f29ab3e47862b837b893 100644 (file)
@@ -39,7 +39,12 @@ VirtioNetShutdownRx (
   IN OUT VNET_DEV *Dev\r
   )\r
 {\r
-  FreePool (Dev->RxBuf);\r
+  Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->RxBufMap);\r
+  Dev->VirtIo->FreeSharedPages (\r
+                 Dev->VirtIo,\r
+                 Dev->RxBufNrPages,\r
+                 Dev->RxBuf\r
+                 );\r
 }\r
 \r
 \r