/** @file\r
Provides the basic UNID functions.\r
\r
-Copyright (c) 2006 - 2010, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2010, 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
http://opensource.org/licenses/bsd-license.php\r
DbPtr->MCastFilterCnt = MAX_MCAST_ADDRESS_CNT;\r
\r
DbPtr->TxBufCnt = TX_BUFFER_COUNT;\r
- DbPtr->TxBufSize = sizeof (TxCB);\r
+ DbPtr->TxBufSize = (UINT16) sizeof (TxCB);\r
DbPtr->RxBufCnt = RX_BUFFER_COUNT;\r
- DbPtr->RxBufSize = sizeof (RxFD);\r
+ DbPtr->RxBufSize = (UINT16) sizeof (RxFD);\r
\r
DbPtr->IFtype = PXE_IFTYPE_ETHERNET;\r
DbPtr->SupportedDuplexModes = PXE_DUPLEX_ENABLE_FULL_SUPPORTED |\r
//\r
// We already filled in 2 UINT32s.\r
//\r
- CdbPtr->DBsize = sizeof (UINT32) * 2;\r
+ CdbPtr->DBsize = (UINT16) (sizeof (UINT32) * 2);\r
\r
//\r
// will claim any hanging free CBs\r
if (AdapterInfo->xmit_done_head == AdapterInfo->xmit_done_tail) {\r
CdbPtr->StatFlags |= PXE_STATFLAGS_GET_STATUS_TXBUF_QUEUE_EMPTY;\r
} else {\r
- for (Index = 0; NumEntries >= sizeof (UINT64); Index++, NumEntries -= sizeof (UINT64)) {\r
+ for (Index = 0; ((Index < MAX_XMIT_BUFFERS) && (NumEntries >= sizeof (UINT64))); Index++, NumEntries -= sizeof (UINT64)) {\r
if (AdapterInfo->xmit_done_head != AdapterInfo->xmit_done_tail) {\r
DbPtr->TxBuffer[Index] = AdapterInfo->xmit_done[AdapterInfo->xmit_done_head];\r
AdapterInfo->xmit_done_head = next (AdapterInfo->xmit_done_head);\r
// Initialize the !PXE structure\r
//\r
PxePtr->Signature = PXE_ROMID_SIGNATURE;\r
- PxePtr->Len = sizeof (PXE_SW_UNDI);\r
+ PxePtr->Len = (UINT8) sizeof (PXE_SW_UNDI);\r
//\r
// cksum\r
//\r