Lines Matching refs:adv
38 int oldadv, adv, bmsr; in genphy_config_advert() local
46 adv = phy_read(phydev, MDIO_DEVAD_NONE, MII_ADVERTISE); in genphy_config_advert()
47 oldadv = adv; in genphy_config_advert()
49 if (adv < 0) in genphy_config_advert()
50 return adv; in genphy_config_advert()
52 adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4 | ADVERTISE_PAUSE_CAP | in genphy_config_advert()
55 adv |= ADVERTISE_10HALF; in genphy_config_advert()
57 adv |= ADVERTISE_10FULL; in genphy_config_advert()
59 adv |= ADVERTISE_100HALF; in genphy_config_advert()
61 adv |= ADVERTISE_100FULL; in genphy_config_advert()
63 adv |= ADVERTISE_PAUSE_CAP; in genphy_config_advert()
65 adv |= ADVERTISE_PAUSE_ASYM; in genphy_config_advert()
67 adv |= ADVERTISE_1000XHALF; in genphy_config_advert()
69 adv |= ADVERTISE_1000XFULL; in genphy_config_advert()
71 if (adv != oldadv) { in genphy_config_advert()
72 err = phy_write(phydev, MDIO_DEVAD_NONE, MII_ADVERTISE, adv); in genphy_config_advert()
91 adv = phy_read(phydev, MDIO_DEVAD_NONE, MII_CTRL1000); in genphy_config_advert()
92 oldadv = adv; in genphy_config_advert()
94 if (adv < 0) in genphy_config_advert()
95 return adv; in genphy_config_advert()
97 adv &= ~(ADVERTISE_1000FULL | ADVERTISE_1000HALF); in genphy_config_advert()
102 adv |= ADVERTISE_1000HALF; in genphy_config_advert()
104 adv |= ADVERTISE_1000FULL; in genphy_config_advert()
107 if (adv != oldadv) in genphy_config_advert()
110 err = phy_write(phydev, MDIO_DEVAD_NONE, MII_CTRL1000, adv); in genphy_config_advert()