/* This algorithm comes from the original mcs7830 version 1.4 driver, not sure if it is needed.  */
static int mcs7830_set_autoneg(struct usbnet *dev, int ptrUserPhyMode)
/* This algorithm comes from the original mcs7830 version 1.4 driver, not sure if it is needed.  */
static int mcs7830_set_autoneg(struct usbnet *dev, int ptrUserPhyMode)
{
	int ret;
	ret = mcs7830_write_phy(dev, MII_ADVERTISE, MCS7830_MII_ADVERTISE);
	if (!ret)
		ret = mcs7830_write_phy(dev, MII_BMCR, 0x0000);
	if (!ret)
		ret = mcs7830_write_phy(dev, MII_BMCR, BMCR_ANENABLE);
	if (!ret)
		ret = mcs7830_write_phy(dev, MII_BMCR,
				BMCR_ANENABLE | BMCR_ANRESTART	);
	return ret < 0 ? : 0;
}