/* mii_check_gmii_support - check if the MII supports Gb interfaces @mii: the MII interface  */
int mii_check_gmii_support(struct mii_if_info *mii)
/* mii_check_gmii_support - check if the MII supports Gb interfaces @mii: the MII interface  */
int mii_check_gmii_support(struct mii_if_info *mii)
{
	int reg;
	reg = mii->mdio_read(mii->dev, mii->phy_id, MII_BMSR);
	if (reg & BMSR_ESTATEN) {
		reg = mii->mdio_read(mii->dev, mii->phy_id, MII_ESTATUS);
		if (reg & (ESTATUS_1000_TFULL | ESTATUS_1000_THALF))
			return 1;
	}
	return 0;
}