summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c8
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
index eaa3c03..9dc32f2 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
@@ -534,6 +534,14 @@ PxeBcDriverBindingStop (
if (EFI_ERROR (Status)) {
return Status;
}
+
+ //
+ // Stop functionality of PXE Base Code protocol
+ //
+ Status = PxeBc->Stop (PxeBc);
+ if (Status != EFI_SUCCESS && Status != EFI_NOT_STARTED) {
+ return Status;
+ }
Private = PXEBC_PRIVATE_DATA_FROM_PXEBC (PxeBc);
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
index d548e67..b41dc76 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
@@ -2697,12 +2697,14 @@ EfiPxeLoadFile (
// Check download status
//
if (Status == EFI_SUCCESS) {
+ PxeBc->Stop (PxeBc);
return EFI_SUCCESS;
} else if (Status == EFI_BUFFER_TOO_SMALL) {
if (Buffer != NULL) {
AsciiPrint ("PXE-E05: Download buffer is smaller than requested file.\n");
} else {
+ PxeBc->Stop (PxeBc);
return Status;
}