/* Writes the command header after does the checksum calculation.  */
static s32 e1000_mng_write_cmd_header(struct e1000_hw *hw, struct e1000_host_mng_command_header *hdr)
/* Writes the command header after does the checksum calculation.  */
static s32 e1000_mng_write_cmd_header(struct e1000_hw *hw, struct e1000_host_mng_command_header *hdr)
{
	u16 i, length = sizeof(struct e1000_host_mng_command_header);
	hdr->checksum = e1000_calculate_checksum((u8 *)hdr, length);
	length >>= 2;
	for (i = 0; i < length; i++) {
		E1000_WRITE_REG_ARRAY(hw, E1000_HOST_IF, i,
					    *((u32 *) hdr + i));
		e1e_flush();
	}
	return 0;
}