summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c13
-rw-r--r--MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h6
-rw-r--r--NetworkPkg/IScsiDxe/IScsiIbft.c12
3 files changed, 23 insertions, 8 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c
index 04f5df3..372efdc 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c
@@ -349,9 +349,16 @@ IScsiFillNICAndTargetSections (
Target->Header.Index = (UINT8) Index;
Target->Header.Flags = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BLOCK_VALID | EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BOOT_SELECTED;
Target->Port = SessionConfigData->NvData.TargetPort;
- Target->CHAPType = AuthConfig->CHAPType;
Target->NicIndex = (UINT8) Index;
+ if (AuthConfig->CHAPType == ISCSI_CHAP_NONE) {
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP;
+ } if (AuthConfig->CHAPType == ISCSI_CHAP_UNI) {
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_CHAP;
+ } else if (AuthConfig->CHAPType == ISCSI_CHAP_MUTUAL) {
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP;
+ }
+
IScsiMapV4ToV6Addr (&SessionConfigData->NvData.TargetIp, &Target->Ip);
CopyMem (Target->BootLun, SessionConfigData->NvData.BootLun, sizeof (Target->BootLun));
@@ -364,7 +371,7 @@ IScsiFillNICAndTargetSections (
Target->IScsiNameLength = Length;
Target->IScsiNameOffset = (UINT16) ((UINTN) *Heap - (UINTN) Table);
- if (Target->CHAPType != ISCSI_CHAP_NONE) {
+ if (Target->CHAPType != EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP) {
//
// CHAP Name
//
@@ -381,7 +388,7 @@ IScsiFillNICAndTargetSections (
Target->CHAPSecretLength = Length;
Target->CHAPSecretOffset = (UINT16) ((UINTN) *Heap - (UINTN) Table);
- if (Target->CHAPType == ISCSI_CHAP_MUTUAL) {
+ if (Target->CHAPType == EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP) {
//
// Reverse CHAP Name
//
diff --git a/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h b/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h
index 0d519d0..1e1a5ac 100644
--- a/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h
+++ b/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h
@@ -2,7 +2,7 @@
The definition for iSCSI Boot Firmware Table, it's defined in Microsoft's
iSCSI Boot Firmware Table(iBFT) as Defined in ACPI 3.0b Specification.
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -157,6 +157,10 @@ typedef struct {
#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_CHAP BIT2
#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_RCHAP BIT3
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP 0
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_CHAP 1
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP 2
+
#pragma pack()
#endif
diff --git a/NetworkPkg/IScsiDxe/IScsiIbft.c b/NetworkPkg/IScsiDxe/IScsiIbft.c
index 9dba4e6..3c179bf 100644
--- a/NetworkPkg/IScsiDxe/IScsiIbft.c
+++ b/NetworkPkg/IScsiDxe/IScsiIbft.c
@@ -1,7 +1,7 @@
/** @file
Implementation for iSCSI Boot Firmware Table publication.
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -359,9 +359,13 @@ IScsiFillNICAndTargetSections (
Target->Port = NvData->TargetPort;
if (Attempt->AuthenticationType == ISCSI_AUTH_TYPE_CHAP) {
- Target->CHAPType = AuthConfig->CHAPType;
+ if (AuthConfig->CHAPType == ISCSI_CHAP_UNI) {
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_CHAP;
+ } else if (AuthConfig->CHAPType == ISCSI_CHAP_MUTUAL) {
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP;
+ }
} else if (Attempt->AuthenticationType == ISCSI_AUTH_TYPE_NONE) {
- Target->CHAPType = ISCSI_AUTH_TYPE_NONE;
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP;
}
Target->NicIndex = (UINT8) Index;
@@ -402,7 +406,7 @@ IScsiFillNICAndTargetSections (
Target->CHAPSecretLength = Length;
Target->CHAPSecretOffset = (UINT16) ((UINTN) *Heap - (UINTN) Table);
- if (Target->CHAPType == ISCSI_CHAP_MUTUAL) {
+ if (Target->CHAPType == EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP) {
//
// Reverse CHAP Name.
//