]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootDxe.c
NetworkPkg: Add URI configuration form to HTTP boot driver.
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootDxe.c
index 9fb33bbb53abf20e874f4ea240543577ab2870d1..6a3033db11a0ebeaecdc62c5bdd4903ab5b9a5b5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Driver Binding functions implementation for UEFI HTTP boot.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -364,6 +364,14 @@ HttpBootIp4DxeDriverBindingStart (
       goto ON_ERROR;\r
     }\r
 \r
+    //\r
+    // Initialize the HII configuration form.\r
+    //\r
+    Status = HttpBootConfigFormInit (Private);\r
+    if (EFI_ERROR (Status)) {\r
+      goto ON_ERROR;\r
+    }\r
+\r
     //\r
     // Install a protocol with Caller Id Guid to the NIC, this is just to build the relationship between\r
     // NIC handle and the private data.\r
@@ -508,8 +516,9 @@ HttpBootIp4DxeDriverBindingStart (
 \r
     \r
 ON_ERROR:\r
-  \r
+\r
   HttpBootDestroyIp4Children (This, Private);\r
+  HttpBootConfigFormUnload (Private);\r
   FreePool (Private);\r
 \r
   return Status;\r
@@ -615,6 +624,11 @@ HttpBootIp4DxeDriverBindingStop (
     // Release the cached data.\r
     //\r
     HttpBootFreeCacheList (Private);\r
+\r
+    //\r
+    // Unload the config form.\r
+    //\r
+    HttpBootConfigFormUnload (Private);\r
     \r
     gBS->UninstallProtocolInterface (\r
            NicHandle,\r
@@ -822,6 +836,14 @@ HttpBootIp6DxeDriverBindingStart (
       goto ON_ERROR;\r
     }\r
 \r
+    //\r
+    // Initialize the HII configuration form.\r
+    //\r
+    Status = HttpBootConfigFormInit (Private);\r
+    if (EFI_ERROR (Status)) {\r
+      goto ON_ERROR;\r
+    }\r
+\r
     //\r
     // Install a protocol with Caller Id Guid to the NIC, this is just to build the relationship between\r
     // NIC handle and the private data.\r
@@ -989,12 +1011,12 @@ HttpBootIp6DxeDriverBindingStart (
   return EFI_SUCCESS;\r
    \r
 ON_ERROR:\r
-  \r
- HttpBootDestroyIp6Children(This, Private);\r
- FreePool (Private);\r
 \r
- return Status;\r
\r
+  HttpBootDestroyIp6Children(This, Private);\r
+  HttpBootConfigFormUnload (Private);\r
+  FreePool (Private);\r
+\r
+  return Status;\r
 }\r
 \r
 /**\r
@@ -1096,7 +1118,12 @@ HttpBootIp6DxeDriverBindingStop (
     // Release the cached data.\r
     //\r
     HttpBootFreeCacheList (Private);\r
-        \r
+\r
+    //\r
+    // Unload the config form.\r
+    //\r
+    HttpBootConfigFormUnload (Private);\r
+\r
     gBS->UninstallProtocolInterface (\r
            NicHandle,\r
            &gEfiCallerIdGuid,\r
@@ -1128,6 +1155,7 @@ HttpBootDxeDriverEntryPoint (
   )\r
 {\r
   EFI_STATUS   Status;\r
+\r
   //\r
   // Install UEFI Driver Model protocol(s).\r
   //\r