/* rts_ds_steer - Receive traffic steering based on IPv4 or IPv6 TOS or Traffic class respectively. @nic: device private variable Description: The function configures the receive steering to desired receive ring. Return Value: SUCCESS on success and '-1' on failure (endian settings incorrect).  */
static int rts_ds_steer(struct s2io_nic *nic, u8 ds_codepoint, u8 ring)
/* rts_ds_steer - Receive traffic steering based on IPv4 or IPv6 TOS or Traffic class respectively. @nic: device private variable Description: The function configures the receive steering to desired receive ring. Return Value: SUCCESS on success and '-1' on failure (endian settings incorrect).  */
static int rts_ds_steer(struct s2io_nic *nic, u8 ds_codepoint, u8 ring)
{
	struct XENA_dev_config __iomem *bar0 = nic->bar0;
	register u64 val64 = 0;
	if (ds_codepoint > 63)
		return FAILURE;
	val64 = RTS_DS_MEM_DATA(ring);
	writeq(val64, &bar0->rts_ds_mem_data);
	val64 = RTS_DS_MEM_CTRL_WE |
		RTS_DS_MEM_CTRL_STROBE_NEW_CMD |
		RTS_DS_MEM_CTRL_OFFSET(ds_codepoint);
	writeq(val64, &bar0->rts_ds_mem_ctrl);
	return wait_for_cmd_complete(&bar0->rts_ds_mem_ctrl,
				     RTS_DS_MEM_CTRL_STROBE_CMD_BEING_EXECUTED,
				     S2IO_BIT_RESET);
}