/* Return: true if he supplied link rate is valid, false otherwise  */
static bool is_link_rate_valid(struct udevice *dev, u8 link_rate)
/* Return: true if he supplied link rate is valid, false otherwise  */
static bool is_link_rate_valid(struct udevice *dev, u8 link_rate)
{
	struct dp_tx *dp_tx = dev_get_priv(dev);
	bool valid = true;
	if (link_rate != LINK_BW_SET_162GBPS &&
	    link_rate != LINK_BW_SET_270GBPS &&
	    link_rate != LINK_BW_SET_540GBPS)
		valid = false;
	else if (link_rate > dp_tx->link_config.max_link_rate)
		valid = false;
	return valid;
}