]> 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 a7fc8a8e2e634505f82035d43c47b21ec3e4d8bd..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
@@ -50,7 +50,6 @@ HttpBootDestroyIp4Children (
 {\r
   ASSERT (This != NULL);\r
   ASSERT (Private != NULL);\r
-  ASSERT (Private->UsingIpv6 == FALSE);\r
 \r
   if (Private->Dhcp4Child != NULL) {\r
     gBS->CloseProtocol (\r
@@ -111,7 +110,6 @@ HttpBootDestroyIp6Children (
 {\r
   ASSERT (This != NULL);\r
   ASSERT (Private != NULL);\r
-  ASSERT (Private->UsingIpv6 == TRUE);\r
   \r
   if (Private->Ip6Child != NULL) {\r
     gBS->CloseProtocol (\r
@@ -366,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
@@ -510,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
@@ -617,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
@@ -824,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
@@ -991,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
@@ -1098,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
@@ -1130,6 +1155,7 @@ HttpBootDxeDriverEntryPoint (
   )\r
 {\r
   EFI_STATUS   Status;\r
+\r
   //\r
   // Install UEFI Driver Model protocol(s).\r
   //\r