diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-12-12 15:26:49 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-12-15 08:46:46 +0800 |
commit | 09cddd088ced31a99d3b0e4ea2f18a77f2582cd2 (patch) | |
tree | fb0e1e7b002ae3a0d4d149e031b0932269c41432 | |
parent | 10e6244236c17548e263c1eaa28d3da266e4a2dd (diff) | |
download | edk2-09cddd088ced31a99d3b0e4ea2f18a77f2582cd2.zip edk2-09cddd088ced31a99d3b0e4ea2f18a77f2582cd2.tar.gz edk2-09cddd088ced31a99d3b0e4ea2f18a77f2582cd2.tar.bz2 |
NetworkPkg/UefiPxeBcDxe: Correct the handle for PXE Base Code Callback Protocol.
According UEFI Spec:
The PXE Base Code Callback Protocol must be on the same handle as the PXE
Base Code Protocol.
But current implementation doesn't follow that. This patch is fix that issue.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c | 6 | ||||
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c index 0bb1d66..1f8895f 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c @@ -994,7 +994,7 @@ PxeBcInstallCallback ( //
PxeBc = &Private->PxeBc;
Status = gBS->HandleProtocol (
- Private->Controller,
+ Private->Mode.UsingIpv6 ? Private->Ip6Nic->Controller : Private->Ip4Nic->Controller,
&gEfiPxeBaseCodeCallbackProtocolGuid,
(VOID **) &Private->PxeBcCallback
);
@@ -1010,7 +1010,7 @@ PxeBcInstallCallback ( // Install a default callback if user didn't offer one.
//
Status = gBS->InstallProtocolInterface (
- &Private->Controller,
+ Private->Mode.UsingIpv6 ? &Private->Ip6Nic->Controller : &Private->Ip4Nic->Controller,
&gEfiPxeBaseCodeCallbackProtocolGuid,
EFI_NATIVE_INTERFACE,
&Private->LoadFileCallback
@@ -1054,7 +1054,7 @@ PxeBcUninstallCallback ( PxeBc->SetParameters (PxeBc, NULL, NULL, NULL, NULL, &NewMakeCallback);
gBS->UninstallProtocolInterface (
- Private->Controller,
+ Private->Mode.UsingIpv6 ? Private->Ip6Nic->Controller : Private->Ip4Nic->Controller,
&gEfiPxeBaseCodeCallbackProtocolGuid,
&Private->LoadFileCallback
);
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c index ab9e494..1fc26c5 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c @@ -1925,7 +1925,7 @@ EfiPxeBcSetParameters ( // Update the previous PxeBcCallback protocol.
//
Status = gBS->HandleProtocol (
- Private->Controller,
+ Mode->UsingIpv6 ? Private->Ip6Nic->Controller : Private->Ip4Nic->Controller,
&gEfiPxeBaseCodeCallbackProtocolGuid,
(VOID **) &Private->PxeBcCallback
);
|