From: Jiaxin Wu <jiaxin.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Ye Ting <ting.ye@intel.com>, Fu Siyuan <siyuan.fu@intel.com>,
Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch 2/3] NetworkPkg/UefiPxeBcDxe: Correct the handle for PXE Base Code Callback Protocol.
Date: Thu, 14 Dec 2017 13:50:06 +0800 [thread overview]
Message-ID: <1513230607-1832-3-git-send-email-jiaxin.wu@intel.com> (raw)
In-Reply-To: <1513230607-1832-1-git-send-email-jiaxin.wu@intel.com>
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>
---
NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c | 6 +++---
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
@@ -992,11 +992,11 @@ PxeBcInstallCallback (
//
// Check whether PxeBaseCodeCallbackProtocol already installed.
//
PxeBc = &Private->PxeBc;
Status = gBS->HandleProtocol (
- Private->Controller,
+ Private->Mode.UsingIpv6 ? Private->Ip6Nic->Controller : Private->Ip4Nic->Controller,
&gEfiPxeBaseCodeCallbackProtocolGuid,
(VOID **) &Private->PxeBcCallback
);
if (Status == EFI_UNSUPPORTED) {
@@ -1008,11 +1008,11 @@ 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
);
@@ -1052,11 +1052,11 @@ PxeBcUninstallCallback (
NewMakeCallback = FALSE;
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
@@ -1923,11 +1923,11 @@ EfiPxeBcSetParameters (
if (*NewMakeCallback) {
//
// Update the previous PxeBcCallback protocol.
//
Status = gBS->HandleProtocol (
- Private->Controller,
+ Mode->UsingIpv6 ? Private->Ip6Nic->Controller : Private->Ip4Nic->Controller,
&gEfiPxeBaseCodeCallbackProtocolGuid,
(VOID **) &Private->PxeBcCallback
);
if (EFI_ERROR (Status) || (Private->PxeBcCallback->Callback == NULL)) {
--
1.9.5.msysgit.1
next prev parent reply other threads:[~2017-12-14 5:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 5:50 [Patch 0/3] Fix the series issues in UefiPxeBcDxe Jiaxin Wu
2017-12-14 5:50 ` [Patch 1/3] NetworkPkg/UefiPxeBcDxe: Fix Pxe.Dhcp() return status code Jiaxin Wu
2017-12-14 5:50 ` Jiaxin Wu [this message]
2017-12-14 5:50 ` [Patch 3/3] NetworkPkg/UefiPxeBcDxe: Allow the NULL configuration for NewStationIP/NewSubnetMask Jiaxin Wu
2017-12-14 5:52 ` [Patch 0/3] Fix the series issues in UefiPxeBcDxe Wu, Jiaxin
2017-12-14 6:06 ` Fu, Siyuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513230607-1832-3-git-send-email-jiaxin.wu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox