diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.h b/NetworkPkg/IScsiDxe/IScsiConfig.h
index 7fd18a0ae2..daa0d34382 100644
--- a/NetworkPkg/IScsiDxe/IScsiConfig.h
+++ b/NetworkPkg/IScsiDxe/IScsiConfig.h
@@ -2,7 +2,7 @@
The header file of functions for configuring or getting the parameters
relating to iSCSI.
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
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
@@ -78,7 +78,7 @@ struct _ISCSI_ATTEMPT_CONFIG_NVDATA {
union {
ISCSI_CHAP_AUTH_CONFIG_NVDATA CHAP;
} AuthConfigData;
-
+ BOOLEAN AutoConfigureSuccess;
};
///
diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c b/NetworkPkg/IScsiDxe/IScsiDriver.c
index 5e5d700e47..363daadc8f 100644
--- a/NetworkPkg/IScsiDxe/IScsiDriver.c
+++ b/NetworkPkg/IScsiDxe/IScsiDriver.c
@@ -477,7 +477,7 @@ IScsiStart (
// Don't process the autoconfigure path if it is already established.
//
if (AttemptConfigData->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG &&
- AttemptConfigData->AutoConfigureMode == IP_MODE_AUTOCONFIG_SUCCESS) {
+ AttemptConfigData->AutoConfigureSuccess) {
continue;
}
@@ -576,7 +576,7 @@ IScsiStart (
// IScsi session success. Update the attempt state to NVR.
//
if (AttemptConfigData->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG) {
- AttemptConfigData->AutoConfigureMode = IP_MODE_AUTOCONFIG_SUCCESS;
+ AttemptConfigData->AutoConfigureSuccess = TRUE;
}
gRT->SetVariable (
diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.h b/NetworkPkg/IScsiDxe/IScsiDriver.h
index 825394a1d2..338e3dcf18 100644
--- a/NetworkPkg/IScsiDxe/IScsiDriver.h
+++ b/NetworkPkg/IScsiDxe/IScsiDriver.h
@@ -1,7 +1,7 @@
/** @file
The header file of IScsiDriver.c.
-Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
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
@@ -29,7 +29,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define IP_MODE_AUTOCONFIG_IP4 3
#define IP_MODE_AUTOCONFIG_IP6 4
-#define IP_MODE_AUTOCONFIG_SUCCESS 5
extern EFI_COMPONENT_NAME2_PROTOCOL gIScsiComponentName2;
extern EFI_COMPONENT_NAME_PROTOCOL gIScsiComponentName;
diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c
index f5c54e7018..e7198d5ab0 100644
--- a/NetworkPkg/IScsiDxe/IScsiMisc.c
+++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
@@ -1054,7 +1054,7 @@ IScsiGetConfigData (
// Check the autoconfig path to see whether it should be retried.
//
if (AttemptTmp->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG &&
- AttemptTmp->AutoConfigureMode != IP_MODE_AUTOCONFIG_SUCCESS) {
+ !AttemptTmp->AutoConfigureSuccess) {
if (mPrivate->Ipv6Flag &&
AttemptTmp->AutoConfigureMode == IP_MODE_AUTOCONFIG_IP6) {
//
@@ -1197,6 +1197,7 @@ IScsiGetConfigData (
AttemptConfigData->AutoConfigureMode =
(UINT8) (mPrivate->Ipv6Flag ? IP_MODE_AUTOCONFIG_IP6 : IP_MODE_AUTOCONFIG_IP4);
+ AttemptConfigData->AutoConfigureSuccess = FALSE;
}
//