Lines Matching full:checksum
182 * txgbe_calc_eeprom_checksum - Calculates and returns the checksum
184 * @checksum: pointer to cheksum
188 static int txgbe_calc_eeprom_checksum(struct wx *wx, u16 *checksum) in txgbe_calc_eeprom_checksum() argument
212 *checksum += local_buffer[i]; in txgbe_calc_eeprom_checksum()
217 *checksum = TXGBE_EEPROM_SUM - *checksum; in txgbe_calc_eeprom_checksum()
223 * txgbe_validate_eeprom_checksum - Validate EEPROM checksum
225 * @checksum_val: calculated checksum
227 * Performs checksum calculation and validates the EEPROM checksum. If the
233 u16 checksum; in txgbe_validate_eeprom_checksum() local
240 status = wx_read_ee_hostif(wx, 0, &checksum); in txgbe_validate_eeprom_checksum()
246 checksum = 0; in txgbe_validate_eeprom_checksum()
247 status = txgbe_calc_eeprom_checksum(wx, &checksum); in txgbe_validate_eeprom_checksum()
256 /* Verify read checksum from EEPROM is the same as in txgbe_validate_eeprom_checksum()
257 * calculated checksum in txgbe_validate_eeprom_checksum()
259 if (read_checksum != checksum) { in txgbe_validate_eeprom_checksum()
261 wx_err(wx, "Invalid EEPROM checksum\n"); in txgbe_validate_eeprom_checksum()
264 /* If the user cares, return the calculated checksum */ in txgbe_validate_eeprom_checksum()
266 *checksum_val = checksum; in txgbe_validate_eeprom_checksum()