Lines Matching refs: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)
109 *checksum += local_buffer[i];
114 *checksum = TXGBE_EEPROM_SUM - *checksum;
120 * txgbe_validate_eeprom_checksum - Validate EEPROM checksum
122 * @checksum_val: calculated checksum
124 * Performs checksum calculation and validates the EEPROM checksum. If the
130 u16 checksum;
137 status = wx_read_ee_hostif(wx, 0, &checksum);
143 checksum = 0;
144 status = txgbe_calc_eeprom_checksum(wx, &checksum);
153 /* Verify read checksum from EEPROM is the same as
154 * calculated checksum
156 if (read_checksum != checksum) {
158 wx_err(wx, "Invalid EEPROM checksum\n");
161 /* If the user cares, return the calculated checksum */
163 *checksum_val = checksum;