summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-20 05:42:23 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-20 05:42:23 +0000
commit36ee91ca3661d3d020a7841aacbf858d885c4728 (patch)
tree418e7a4d4a84d86a78d4b260acab20877be5bd45 /MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
parent04e12c21476db29e8f92030ed00122fa4e1e56cc (diff)
downloadedk2-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/Mtftp4Dxe/Mtftp4Impl.c')
-rw-r--r--MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
index 3ce8792537..214ac44745 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;