]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IScsiDxe/IScsiIbft.c
Change the library global variable to add library name prefix to avoid potential...
[mirror_edk2.git] / NetworkPkg / IScsiDxe / IScsiIbft.c
index 879d310cc919e3d9f06ba2e682c1ba7fcbdd737d..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
@@ -321,14 +321,10 @@ IScsiFillNICAndTargetSections (
       Nic->SubnetMaskPrefixLength = NvData->PrefixLength;\r
       CopyMem (&Nic->Ip, &NvData->LocalIp, sizeof (EFI_IPv6_ADDRESS));\r
       CopyMem (&Nic->Gateway, &NvData->Gateway, sizeof (EFI_IPv6_ADDRESS));\r
-      \r
       CopyMem (&Nic->PrimaryDns, &Attempt->PrimaryDns, sizeof (EFI_IPv6_ADDRESS));\r
       CopyMem (&Nic->SecondaryDns, &Attempt->SecondaryDns, sizeof (EFI_IPv6_ADDRESS));\r
-      //\r
-      // TODO: DHCP server address cannot be retrieved by DHCPv6 process since \r
-      // DHCP server option is removed.\r
-      //CopyMem (&Nic->DhcpServer, &Attempt->DhcpServer, sizeof (EFI_IPv6_ADDRESS));\r
-      //\r
+      CopyMem (&Nic->DhcpServer, &Attempt->DhcpServer, sizeof (EFI_IPv6_ADDRESS));\r
+\r
     } else {\r
       ASSERT (FALSE);\r
     }\r
@@ -363,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
@@ -406,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