Lines Matching refs:mii

41 mii_link_ok ( struct mii_if_info *mii )  in mii_link_ok()  argument
44 mii->mdio_read ( mii->dev, mii->phy_id, MII_BMSR ); in mii_link_ok()
45 if ( mii->mdio_read ( mii->dev, mii->phy_id, MII_BMSR ) & BMSR_LSTATUS ) in mii_link_ok()
59 mii_check_link ( struct mii_if_info *mii ) in mii_check_link() argument
61 int cur_link = mii_link_ok ( mii ); in mii_check_link()
62 int prev_link = netdev_link_ok ( mii->dev ); in mii_check_link()
65 netdev_link_up ( mii->dev ); in mii_check_link()
67 netdev_link_down ( mii->dev ); in mii_check_link()
81 mii_check_media ( struct mii_if_info *mii, in mii_check_media() argument
90 if (mii->force_media) in mii_check_media()
94 old_carrier = netdev_link_ok ( mii->dev ) ? 1 : 0; in mii_check_media()
95 new_carrier = (unsigned int) mii_link_ok ( mii ); in mii_check_media()
105 netdev_link_down ( mii->dev ); in mii_check_media()
107 DBG ( "%s: link down\n", mii->dev->name); in mii_check_media()
114 netdev_link_up ( mii->dev ); in mii_check_media()
117 if ( ( ! init_media ) && ( mii->advertising ) ) { in mii_check_media()
118 advertise = mii->advertising; in mii_check_media()
120 advertise = mii->mdio_read ( mii->dev, mii->phy_id, MII_ADVERTISE ); in mii_check_media()
121 mii->advertising = advertise; in mii_check_media()
123 lpa = mii->mdio_read ( mii->dev, mii->phy_id, MII_LPA ); in mii_check_media()
124 if ( mii->supports_gmii ) in mii_check_media()
125 lpa2 = mii->mdio_read ( mii->dev, mii->phy_id, MII_STAT1000 ); in mii_check_media()
135 mii->dev->name, in mii_check_media()
141 if ( ( init_media ) || ( mii->full_duplex != duplex ) ) { in mii_check_media()
142 mii->full_duplex = duplex; in mii_check_media()