summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-24 02:30:53 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-24 02:30:53 +0000
commit7e038442a84e882ddc8a6b2e23243c6d4e371090 (patch)
tree21e68d75f8c4c8eae99ffa6edf53c6e31d538ebf /MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c
parent630d580d530d3154ad90eee3f3688ab00b335275 (diff)
downloadedk2-platforms-7e038442a84e882ddc8a6b2e23243c6d4e371090.tar.xz
remove the self-implementation on checksum() in this module by using BaseLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8637 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c')
-rw-r--r--MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c43
1 files changed, 4 insertions, 39 deletions
diff --git a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c
index f169d88ffe..670fa18d53 100644
--- a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c
+++ b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c
@@ -1381,38 +1381,6 @@ badcdb:
/**
- This does an 8 bit check sum of the passed in buffer for Len bytes.
- This is primarily used to update the check sum in the SW UNDI header.
-
- @param Buffer Pointer to the passed in buffer to check sum
- @param Len Length of buffer to be check summed in bytes.
-
- @return None
-
-**/
-UINT8
-ChkSum (
- IN VOID *Buffer,
- IN UINT16 Len
- )
-{
- UINT8 Chksum;
- INT8 *Bp;
-
- Chksum = 0;
- if ((Bp = Buffer) != NULL) {
- while (Len--) {
- Chksum = (UINT8) (Chksum +*Bp++);
-
- }
-
- }
-
- return Chksum;
-}
-
-
-/**
When called with a null NicPtr, this routine decrements the number of NICs
this UNDI is supporting and removes the NIC_DATA_POINTER from the array.
Otherwise, it increments the number of NICs this UNDI is supported and
@@ -1423,7 +1391,6 @@ ChkSum (
@return None
**/
-// TODO: PxePtr - add argument and description to function comment
VOID
PxeUpdate (
IN NIC_DATA_INSTANCE *NicPtr,
@@ -1438,7 +1405,7 @@ PxeUpdate (
PxePtr->IFcnt--;
}
- PxePtr->Fudge = (UINT8) (PxePtr->Fudge - ChkSum ((VOID *) PxePtr, PxePtr->Len));
+ PxePtr->Fudge = (UINT8) (PxePtr->Fudge - CalculateSum8 ((VOID *) PxePtr, PxePtr->Len));
return ;
}
@@ -1446,7 +1413,7 @@ PxeUpdate (
// number of NICs this undi supports
//
PxePtr->IFcnt++;
- PxePtr->Fudge = (UINT8) (PxePtr->Fudge - ChkSum ((VOID *) PxePtr, PxePtr->Len));
+ PxePtr->Fudge = (UINT8) (PxePtr->Fudge - CalculateSum8 ((VOID *) PxePtr, PxePtr->Len));
return ;
}
@@ -1455,14 +1422,12 @@ PxeUpdate (
/**
Initialize the !PXE structure
- @param RemainingDevicePath Not used, always produce all possible children.
+ @param PxePtr Pointer to SW_UNDI data structure.
@retval EFI_SUCCESS This driver is added to Controller.
@retval other This driver does not support this device.
**/
-// TODO: PxePtr - add argument and description to function comment
-// TODO: VersionFlag - add argument and description to function comment
VOID
PxeStructInit (
IN PXE_SW_UNDI *PxePtr
@@ -1507,6 +1472,6 @@ PxeStructInit (
PxePtr->BusCnt = 1;
PxePtr->BusType[0] = PXE_BUSTYPE_PCI;
- PxePtr->Fudge = (UINT8) (PxePtr->Fudge - ChkSum ((VOID *) PxePtr, PxePtr->Len));
+ PxePtr->Fudge = (UINT8) (PxePtr->Fudge - CalculateSum8 ((VOID *) PxePtr, PxePtr->Len));
}