/* Return: The next state machine state to advance to  */
static int training_state_adjust_link_rate(struct udevice *dev)
/* Return: The next state machine state to advance to  */
static int training_state_adjust_link_rate(struct udevice *dev)
{
	struct dp_tx *dp_tx = dev_get_priv(dev);
	int status;
	switch (dp_tx->link_config.link_rate) {
	case LINK_BW_SET_540GBPS:
		status = set_link_rate(dev, LINK_BW_SET_270GBPS);
		if (status) {
			status = TS_FAILURE;
			break;
		}
		status = TS_CLOCK_RECOVERY;
		break;
	case LINK_BW_SET_270GBPS:
		status = set_link_rate(dev, LINK_BW_SET_162GBPS);
		if (status) {
			status = TS_FAILURE;
			break;
		}
		status = TS_CLOCK_RECOVERY;
		break;
	default:
		status = TS_ADJUST_LANE_COUNT;
		break;
	}
	return status;
}