summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2017-12-12 15:26:49 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2017-12-15 08:46:46 +0800
commit09cddd088ced31a99d3b0e4ea2f18a77f2582cd2 (patch)
treefb0e1e7b002ae3a0d4d149e031b0932269c41432 /NetworkPkg
parent10e6244236c17548e263c1eaa28d3da266e4a2dd (diff)
downloadedk2-09cddd088ced31a99d3b0e4ea2f18a77f2582cd2.tar.gz
edk2-09cddd088ced31a99d3b0e4ea2f18a77f2582cd2.tar.bz2
edk2-09cddd088ced31a99d3b0e4ea2f18a77f2582cd2.zip
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>
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c6
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
index 0bb1d661e5..1f8895fdaa 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 ab9e494b56..1fc26c55da 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
);