/* Calculates the checksum for some buffer on a specified length. The checksum calculated is returned.  */
static u8 e1000_calculate_checksum(u8 *buffer, u32 length)
/* Calculates the checksum for some buffer on a specified length. The checksum calculated is returned.  */
static u8 e1000_calculate_checksum(u8 *buffer, u32 length)
{
	u32 i;
	u8  sum = 0;
	if (!buffer)
		return 0;
	for (i = 0; i < length; i++)
		sum += buffer[i];
	return (u8) (0 - sum);
}