Lines Matching defs:checksum
759 /* Load entire EEPROM image into driver cache and validate checksum */
762 u16 addr, addr_len = 8, checksum = 0;
771 checksum += le16_to_cpu(nic->eeprom[addr]);
774 /* The checksum, stored in the last word, is calculated such that
776 if (cpu_to_le16(0xBABA - checksum) != nic->eeprom[nic->eeprom_wc - 1]) {
785 /* Save (portion of) driver EEPROM cache to device and update checksum */
788 u16 addr, addr_len = 8, checksum = 0;
800 /* The checksum, stored in the last word, is calculated such that
803 checksum += le16_to_cpu(nic->eeprom[addr]);
804 nic->eeprom[nic->eeprom_wc - 1] = cpu_to_le16(0xBABA - checksum);