src/dpdk/drivers/net/e1000/base/e1000_manage.c
s32 e1000_mng_write_dhcp_info_generic(struct e1000_hw *hw, u8 *buffer,
				      u16 length)
{
	struct e1000_host_mng_command_header hdr;
	s32 ret_val;
	u32 hicr;

	DEBUGFUNC("e1000_mng_write_dhcp_info_generic");

	hdr.command_id = E1000_MNG_DHCP_TX_PAYLOAD_CMD;
	hdr.command_length = length;
	hdr.reserved1 = 0;
	hdr.reserved2 = 0;
	hdr.checksum = 0;

	/* Enable the host interface */
	ret_val = e1000_mng_enable_host_if_generic(hw);
	if (ret_val)
		return ret_val;

	/* Populate the host interface with the contents of "buffer". */
	ret_val = e1000_mng_host_if_write_generic(hw, buffer, length,
						  sizeof(hdr), &(hdr.checksum));
	if (ret_val)
		return ret_val;

	/* Write the manageability command header */
	ret_val = e1000_mng_write_cmd_header_generic(hw, &hdr);
	if (ret_val)
		return ret_val;

	/* Tell the ARC a new command is pending. */
	hicr = E1000_READ_REG(hw, E1000_HICR);
	E1000_WRITE_REG(hw, E1000_HICR, hicr | E1000_HICR_C);

	return E1000_SUCCESS;
}
/**
 *  e1000_mng_write_dhcp_info_generic - Writes DHCP info to host interface
 *  @hw: pointer to the HW structure
 *  @buffer: pointer to the host interface
 *  @length: size of the buffer
 *
 *  Writes the DHCP information to the host interface.
 **/
Writes DHCP info to host interface
@hw: pointer to the HW structure
@buffer: pointer to the host interface
@length: size of the buffer

Writes the DHCP information to the host interface.
Writes DHCP info to host interface @hw : pointer to the HW structure @buffer : pointer to the host interface @length : size of the buffer Writes the DHCP information to the host interface .
s32 e1000_mng_write_dhcp_info_generic(struct e1000_hw *hw, u8 *buffer,
				      u16 length)
{
	struct e1000_host_mng_command_header hdr;
	s32 ret_val;
	u32 hicr;
	DEBUGFUNC("e1000_mng_write_dhcp_info_generic");
	hdr.command_id = E1000_MNG_DHCP_TX_PAYLOAD_CMD;
	hdr.command_length = length;
	hdr.reserved1 = 0;
	hdr.reserved2 = 0;
	hdr.checksum = 0;
	ret_val = e1000_mng_enable_host_if_generic(hw);
	if (ret_val)
		return ret_val;
	ret_val = e1000_mng_host_if_write_generic(hw, buffer, length,
						  sizeof(hdr), &(hdr.checksum));
	if (ret_val)
		return ret_val;
	ret_val = e1000_mng_write_cmd_header_generic(hw, &hdr);
	if (ret_val)
		return ret_val;
	hicr = E1000_READ_REG(hw, E1000_HICR);
	E1000_WRITE_REG(hw, E1000_HICR, hicr | E1000_HICR_C);
	return E1000_SUCCESS;
}
s32 e1000_mng_write_dhcp_info_generic ( struct e1000_hw * hw , u8 * buffer , u16 length ) { struct e1000_host_mng_command_header hdr ; s32 ret_val ; u32 hicr ; DEBUGFUNC ( " " ) ; hdr . command_id = E1000_MNG_DHCP_TX_PAYLOAD_CMD ; hdr . command_length = length ; hdr . reserved1 = 0 ; hdr . reserved2 = 0 ; hdr . checksum = 0 ; ret_val = e1000_mng_enable_host_if_generic ( hw ) ; if ( ret_val ) return ret_val ; ret_val = e1000_mng_host_if_write_generic ( hw , buffer , length , sizeof ( hdr ) , & ( hdr . checksum ) ) ; if ( ret_val ) return ret_val ; ret_val = e1000_mng_write_cmd_header_generic ( hw , & hdr ) ; if ( ret_val ) return ret_val ; hicr = E1000_READ_REG ( hw , E1000_HICR ) ; E1000_WRITE_REG ( hw , E1000_HICR , hicr | E1000_HICR_C ) ; return E1000_SUCCESS ; }
e1000_mng_write_dhcp_info_generic - Writes DHCP info to host interface
  @hw: pointer to the HW structure
  @buffer: pointer to the host interface
  @length: size of the buffer
e1000_mng_write_dhcp_info_generic - Writes DHCP info to host interface @hw : pointer to the HW structure @buffer : pointer to the host interface @length : size of the buffer
/* Enable the host interface */ /* Populate the host interface with the contents of "buffer". */ /* Write the manageability command header */ /* Tell the ARC a new command is pending. */