/* e1000_rar_set_vf - set device MAC address @hw: pointer to the HW structure @addr: pointer to the receive address @index receive address array register  */
static void e1000_rar_set_vf(struct e1000_hw *, u8 *, u32)
/* e1000_rar_set_vf - set device MAC address @hw: pointer to the HW structure @addr: pointer to the receive address @index receive address array register  */
static void e1000_rar_set_vf(struct e1000_hw *, u8 *, u32)
{
	struct e1000_mbx_info *mbx = &hw->mbx;
	u32 msgbuf[3];
	u8 *msg_addr = (u8 *)(&msgbuf[1]);
	s32 ret_val;
	memset(msgbuf, 0, 12);
	msgbuf[0] = E1000_VF_SET_MAC_ADDR;
	memcpy(msg_addr, addr, 6);
	ret_val = mbx->ops.write_posted(hw, msgbuf, 3);
	if (!ret_val)
		ret_val = mbx->ops.read_posted(hw, msgbuf, 3);
	msgbuf[0] &= ~E1000_VT_MSGTYPE_CTS;
	if (!ret_val &&
	    (msgbuf[0] == (E1000_VF_SET_MAC_ADDR | E1000_VT_MSGTYPE_NACK)))
		e1000_read_mac_addr_vf(hw);
}