/* The header checksum is just a very simple checksum over the header area. There is still a crc32 over the whole lot.  */
static uint16_t sfp_hdr_checksum(uint8_t *buf, unsigned char ver)
/* The header checksum is just a very simple checksum over the header area. There is still a crc32 over the whole lot.  */
static uint16_t sfp_hdr_checksum(uint8_t *buf, unsigned char ver)
{
	uint16_t ret = 0;
	int len = sfp_hdr_size(ver) - sizeof(ret);
	while (--len)
		ret += *buf++;
	return ret;
}