]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
1. Add DPC protocol and DpcLib library in MdeModulePkg.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / MnpDxe / MnpMain.c
index 04e437e939fea1441e08487d23ad35ce160956e9..b6d93921b294f8e5647b3439a192f574785b4139 100644 (file)
@@ -531,6 +531,11 @@ MnpReceive (
     // Try to deliver any buffered packets.\r
     //\r
     Status = MnpInstanceDeliverPacket (Instance);\r
+\r
+    //\r
+    // Dispatch the DPC queued by the NotifyFunction of Token->Event.\r
+    //\r
+    NetLibDispatchDpc ();\r
   }\r
 \r
 ON_EXIT:\r
@@ -596,6 +601,11 @@ MnpCancel (
     Status = (Status == EFI_ABORTED) ? EFI_SUCCESS : EFI_NOT_FOUND;\r
   }\r
 \r
+  //\r
+  // Dispatch the DPC queued by the NotifyFunction of the cancled token's events.\r
+  //\r
+  NetLibDispatchDpc ();\r
+\r
 ON_EXIT:\r
   NET_RESTORE_TPL (OldTpl);\r
 \r
@@ -648,8 +658,11 @@ MnpPoll (
   //\r
   Status = MnpReceivePacket (Instance->MnpServiceData);\r
 \r
+  NetLibDispatchDpc ();\r
+\r
 ON_EXIT:\r
   NET_RESTORE_TPL (OldTpl);\r
 \r
   return Status;\r
 }\r
+\r