Lines Matching defs: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)
104 *checksum += local_buffer[i];
109 *checksum = TXGBE_EEPROM_SUM - *checksum;
115 * txgbe_validate_eeprom_checksum - Validate EEPROM checksum
117 * @checksum_val: calculated checksum
119 * Performs checksum calculation and validates the EEPROM checksum. If the
125 u16 checksum;
132 status = wx_read_ee_hostif(wx, 0, &checksum);
138 checksum = 0;
139 status = txgbe_calc_eeprom_checksum(wx, &checksum);
148 /* Verify read checksum from EEPROM is the same as
149 * calculated checksum
151 if (read_checksum != checksum) {
153 wx_err(wx, "Invalid EEPROM checksum\n");
156 /* If the user cares, return the calculated checksum */
158 *checksum_val = checksum;