]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IScsiDxe/IScsiIbft.c
Verified ChildHandle, and correct the name for a child.
[mirror_edk2.git] / NetworkPkg / IScsiDxe / IScsiIbft.c
index 9dba4e6f365ca2bad35fce5a38599663422dcc25..3c179bfc5140bfe587a550ad75c86807594bd442 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation for iSCSI Boot Firmware Table publication.\r
 \r
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -359,9 +359,13 @@ IScsiFillNICAndTargetSections (
     Target->Port                = NvData->TargetPort;\r
 \r
     if (Attempt->AuthenticationType == ISCSI_AUTH_TYPE_CHAP) {\r
-      Target->CHAPType          = AuthConfig->CHAPType;\r
+      if (AuthConfig->CHAPType == ISCSI_CHAP_UNI) {\r
+        Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_CHAP;\r
+      } else if (AuthConfig->CHAPType == ISCSI_CHAP_MUTUAL) {\r
+        Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP;\r
+      }\r
     } else if (Attempt->AuthenticationType == ISCSI_AUTH_TYPE_NONE) {\r
-      Target->CHAPType          = ISCSI_AUTH_TYPE_NONE;\r
+      Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP;\r
     }\r
 \r
     Target->NicIndex            = (UINT8) Index;\r
@@ -402,7 +406,7 @@ IScsiFillNICAndTargetSections (
       Target->CHAPSecretLength  = Length;\r
       Target->CHAPSecretOffset  = (UINT16) ((UINTN) *Heap - (UINTN) Table);\r
 \r
-      if (Target->CHAPType == ISCSI_CHAP_MUTUAL) {\r
+      if (Target->CHAPType == EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP) {\r
         //\r
         // Reverse CHAP Name.\r
         //\r