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/Mtftp4Dxe | |
parent | 04e12c21476db29e8f92030ed00122fa4e1e56cc (diff) | |
download | edk2-36ee91ca3661d3d020a7841aacbf858d885c4728.zip edk2-36ee91ca3661d3d020a7841aacbf858d885c4728.tar.gz edk2-36ee91ca3661d3d020a7841aacbf858d885c4728.tar.bz2 |
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/Mtftp4Dxe')
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c | 18 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h | 14 |
3 files changed, 15 insertions, 21 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c index ceabbfe..1186249 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c @@ -174,7 +174,7 @@ Mtftp4CreateService ( //
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL | EVT_TIMER,
- TPL_CALLBACK,
+ NET_TPL_TIMER,
Mtftp4OnTimerTick,
MtftpSb,
&MtftpSb->Timer
@@ -191,7 +191,7 @@ Mtftp4CreateService ( //
Status = gBS->CreateEvent (
EVT_TIMER,
- TPL_CALLBACK,
+ NET_TPL_TIMER,
NULL,
NULL,
&MtftpSb->TimerToGetMap
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c index 3ce8792..214ac44 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c @@ -260,13 +260,11 @@ Mtftp4GetInfoCheckPacket ( IN EFI_MTFTP4_PACKET *Packet
)
{
- MTFTP4_PROTOCOL *Instance;
MTFTP4_GETINFO_STATE *State;
EFI_STATUS Status;
UINT16 OpCode;
- Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
- State = &Instance->GetInfoState;
+ State = (MTFTP4_GETINFO_STATE *) Token->Context;
OpCode = NTOHS (Packet->OpCode);
//
@@ -337,8 +335,7 @@ EfiMtftp4GetInfo ( )
{
EFI_MTFTP4_TOKEN Token;
- MTFTP4_PROTOCOL *Instance;
- MTFTP4_GETINFO_STATE *State;
+ MTFTP4_GETINFO_STATE State;
EFI_STATUS Status;
if ((This == NULL) || (Filename == NULL) || (PacketLength == NULL) ||
@@ -351,11 +348,9 @@ EfiMtftp4GetInfo ( }
*PacketLength = 0;
- Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
- State = &Instance->GetInfoState;
- State->Packet = Packet;
- State->PacketLen = PacketLength;
- State->Status = EFI_SUCCESS;
+ State.Packet = Packet;
+ State.PacketLen = PacketLength;
+ State.Status = EFI_SUCCESS;
//
// Fill in the Token to issue an synchronous ReadFile operation
@@ -369,6 +364,7 @@ EfiMtftp4GetInfo ( Token.OptionList = OptionList;
Token.BufferSize = 0;
Token.Buffer = NULL;
+ Token.Context = &State;
Token.CheckPacket = Mtftp4GetInfoCheckPacket;
Token.TimeoutCallback = NULL;
Token.PacketNeeded = NULL;
@@ -376,7 +372,7 @@ EfiMtftp4GetInfo ( Status = EfiMtftp4ReadFile (This, &Token);
if (EFI_ABORTED == Status) {
- return State->Status;
+ return State.Status;
}
return Status;
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h index c12b1dd..9491506 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h @@ -86,12 +86,6 @@ struct _MTFTP4_SERVICE { UDP_IO_PORT *ConnectUdp;
};
-typedef struct {
- EFI_MTFTP4_PACKET **Packet;
- UINT32 *PacketLen;
- EFI_STATUS Status;
-} MTFTP4_GETINFO_STATE;
-
struct _MTFTP4_PROTOCOL {
UINT32 Signature;
NET_LIST_ENTRY Link;
@@ -146,10 +140,14 @@ struct _MTFTP4_PROTOCOL { UINT16 McastPort;
BOOLEAN Master;
UDP_IO_PORT *McastUdpPort;
-
- MTFTP4_GETINFO_STATE GetInfoState;
};
+typedef struct {
+ EFI_MTFTP4_PACKET **Packet;
+ UINT32 *PacketLen;
+ EFI_STATUS Status;
+} MTFTP4_GETINFO_STATE;
+
VOID
Mtftp4CleanOperation (
IN MTFTP4_PROTOCOL *Instance,
|