Lines Matching full:checksum
74 * txgbe_calc_eeprom_checksum - Calculates and returns the checksum
76 * @checksum: pointer to cheksum
80 static int txgbe_calc_eeprom_checksum(struct wx *wx, u16 *checksum) in txgbe_calc_eeprom_checksum() argument
104 *checksum += local_buffer[i]; in txgbe_calc_eeprom_checksum()
108 *checksum = TXGBE_EEPROM_SUM - *checksum; in txgbe_calc_eeprom_checksum()
114 * txgbe_validate_eeprom_checksum - Validate EEPROM checksum
116 * @checksum_val: calculated checksum
118 * Performs checksum calculation and validates the EEPROM checksum. If the
124 u16 checksum; in txgbe_validate_eeprom_checksum() local
131 status = wx_read_ee_hostif(wx, 0, &checksum); in txgbe_validate_eeprom_checksum()
137 checksum = 0; in txgbe_validate_eeprom_checksum()
138 status = txgbe_calc_eeprom_checksum(wx, &checksum); in txgbe_validate_eeprom_checksum()
147 /* Verify read checksum from EEPROM is the same as in txgbe_validate_eeprom_checksum()
148 * calculated checksum in txgbe_validate_eeprom_checksum()
150 if (read_checksum != checksum) { in txgbe_validate_eeprom_checksum()
152 wx_err(wx, "Invalid EEPROM checksum\n"); in txgbe_validate_eeprom_checksum()
155 /* If the user cares, return the calculated checksum */ in txgbe_validate_eeprom_checksum()
157 *checksum_val = checksum; in txgbe_validate_eeprom_checksum()