/* Get the existing attempt config data from global structure by the NicIndex. */
ISCSI_ATTEMPT_CONFIG_NVDATA* IScsiConfigGetAttemptByNic(IN ISCSI_ATTEMPT_CONFIG_NVDATA *NewAttempt, IN UINT8 IScsiMode)
/* Get the existing attempt config data from global structure by the NicIndex. */
ISCSI_ATTEMPT_CONFIG_NVDATA* IScsiConfigGetAttemptByNic(IN ISCSI_ATTEMPT_CONFIG_NVDATA *NewAttempt, IN UINT8 IScsiMode)
{
  LIST_ENTRY                   *Entry;
  ISCSI_ATTEMPT_CONFIG_NVDATA  *Attempt;
  NET_LIST_FOR_EACH (Entry, &mPrivate->AttemptConfigs) {
    Attempt = NET_LIST_USER_STRUCT (Entry, ISCSI_ATTEMPT_CONFIG_NVDATA, Link);
    if ((Attempt != NewAttempt) && (Attempt->NicIndex == NewAttempt->NicIndex) &&
        (Attempt->SessionConfigData.Enabled == IScsiMode))
    {
      return Attempt;
    }
  }
  return NULL;
}