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>
This commit is contained in:
Jiaxin Wu 2017-12-12 15:26:49 +08:00
parent 10e6244236
commit 09cddd088c
2 changed files with 4 additions and 4 deletions

View File

@ -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
);

View File

@ -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
);