/* Older driver gets the media mode from mii status output register. Now we set our media capability and auto-negotiate to get the upper bound of speed and duplex between two ends. If the types of mii phy is HOME, it doesn't need to auto-negotiate and autong_complete should be set to 1.  */
static void sis900_check_mode(struct net_device *net_dev, struct mii_phy *mii_phy)
/* Older driver gets the media mode from mii status output register. Now we set our media capability and auto-negotiate to get the upper bound of speed and duplex between two ends. If the types of mii phy is HOME, it doesn't need to auto-negotiate and autong_complete should be set to 1.  */
static void sis900_check_mode(struct net_device *net_dev, struct mii_phy *mii_phy)
{
	struct sis900_private *sis_priv = netdev_priv(net_dev);
	long ioaddr = net_dev->base_addr;
	int speed, duplex;
	if (mii_phy->phy_types == LAN) {
		outl(~EXD & inl(ioaddr + cfg), ioaddr + cfg);
		sis900_set_capability(net_dev , mii_phy);
		sis900_auto_negotiate(net_dev, sis_priv->cur_phy);
	} else {
		outl(EXD | inl(ioaddr + cfg), ioaddr + cfg);
		speed = HW_SPEED_HOME;
		duplex = FDX_CAPABLE_HALF_SELECTED;
		sis900_set_mode(ioaddr, speed, duplex);
		sis_priv->autong_complete = 1;
	}
}