]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootComponentName.c
UefiCpuPkg/MpInitLib: Optimize get processor number performance.
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootComponentName.c
index 0708598c4faf48592d39c73b133fbb8dfd2a60d5..d8988a3521515b67b0ea651e5b520d7e198e57ab 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol.\r
 \r
-Copyright (c) 2015, 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
+Copyright (c) 2015 - 2018, 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
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 ///\r
 /// Component Name Protocol instance\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_COMPONENT_NAME_PROTOCOL  gHttpBootDxeComponentName = {\r
   (EFI_COMPONENT_NAME_GET_DRIVER_NAME)    HttpBootDxeComponentNameGetDriverName,\r
   (EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)HttpBootDxeComponentNameGetControllerName,\r
@@ -27,7 +27,7 @@ EFI_COMPONENT_NAME_PROTOCOL  gHttpBootDxeComponentName = {
 ///\r
 /// Component Name 2 Protocol instance\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_COMPONENT_NAME2_PROTOCOL  gHttpBootDxeComponentName2 = {\r
   HttpBootDxeComponentNameGetDriverName,\r
   HttpBootDxeComponentNameGetControllerName,\r
@@ -37,7 +37,7 @@ EFI_COMPONENT_NAME2_PROTOCOL  gHttpBootDxeComponentName2 = {
 ///\r
 /// Table of driver names\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {\r
   { "eng;en", (CHAR16 *)L"UEFI HTTP Boot Driver" },\r
   { NULL, NULL }\r
@@ -46,7 +46,7 @@ EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {
 ///\r
 /// Table of controller names\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_UNICODE_STRING_TABLE mHttpBootDxeControllerNameTable[] = {\r
   { "eng;en", (CHAR16 *)L"UEFI Http Boot Controller" },\r
   { NULL, NULL }\r
@@ -148,10 +148,13 @@ HttpBootDxeComponentNameGetControllerName (
   if (ControllerHandle == NULL || ChildHandle != NULL) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   NicHandle = HttpBootGetNicByIp4Children (ControllerHandle);\r
   if (NicHandle == NULL) {\r
-    return EFI_UNSUPPORTED;\r
+    NicHandle = HttpBootGetNicByIp6Children(ControllerHandle);\r
+    if (NicHandle == NULL) {\r
+      return EFI_UNSUPPORTED;\r
+    }\r
   }\r
 \r
   //\r