diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-20 05:42:23 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-20 05:42:23 +0000 |
commit | 36ee91ca3661d3d020a7841aacbf858d885c4728 (patch) | |
tree | 418e7a4d4a84d86a78d4b260acab20877be5bd45 /MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c | |
parent | 04e12c21476db29e8f92030ed00122fa4e1e56cc (diff) | |
download | edk2-platforms-36ee91ca3661d3d020a7841aacbf858d885c4728.tar.xz |
1. Add DPC protocol and DpcLib library in MdeModulePkg.
2. Add DpcDxe module and DxeDpcLib module in MdeModulePkg
3. Port network stack module to use DPC.
4. Use MIN, and MAX defined in MdePkg to replace NET_MIN and NET_MAX.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4307 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c')
-rw-r--r-- | MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c index 3d26ec2a4c..ed8bf78282 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c @@ -294,6 +294,11 @@ SIGNAL_TOKEN: Token->Status = Status;
gBS->SignalEvent (Token->Event);
+ //
+ // Dispatch the DPC queued by the NotifyFunction of Token->Event.
+ //
+ NetLibDispatchDpc ();
+
return EFI_SUCCESS;
}
@@ -562,12 +567,6 @@ MnpMatchPacket ( ConfigData = &Instance->ConfigData;
- if (ConfigData->EnablePromiscuousReceive) {
- //
- // Always match if this instance is configured to be promiscuous.
- //
- return TRUE;
- }
//
// Check the protocol type.
//
@@ -575,6 +574,13 @@ MnpMatchPacket ( return FALSE;
}
+ if (ConfigData->EnablePromiscuousReceive) {
+ //
+ // Always match if this instance is configured to be promiscuous.
+ //
+ return TRUE;
+ }
+
//
// The protocol type is matched, check receive filter, include unicast and broadcast.
//
@@ -987,6 +993,11 @@ MnpReceivePacket ( //
MnpDeliverPacket (MnpServiceData);
+ //
+ // Dispatch the DPC queued by the NotifyFunction of rx token's events.
+ //
+ NetLibDispatchDpc ();
+
EXIT:
ASSERT (Nbuf->TotalSize == MnpServiceData->BufferLength);
@@ -1087,4 +1098,6 @@ MnpSystemPoll ( // Try to receive packets from Snp.
//
MnpReceivePacket (MnpServiceData);
+
+ NetLibDispatchDpc ();
}
|