aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/phy/phy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index f71dab347667..e323efd4ed18 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -261,7 +261,7 @@ void phy_sanitize_settings(struct phy_device *phydev)
261 261
262 /* Sanitize settings based on PHY capabilities */ 262 /* Sanitize settings based on PHY capabilities */
263 if ((features & SUPPORTED_Autoneg) == 0) 263 if ((features & SUPPORTED_Autoneg) == 0)
264 phydev->autoneg = 0; 264 phydev->autoneg = AUTONEG_DISABLE;
265 265
266 idx = phy_find_valid(phy_find_setting(phydev->speed, phydev->duplex), 266 idx = phy_find_valid(phy_find_setting(phydev->speed, phydev->duplex),
267 features); 267 features);
@@ -374,7 +374,7 @@ int phy_mii_ioctl(struct phy_device *phydev,
374 if (mii_data->phy_id == phydev->addr) { 374 if (mii_data->phy_id == phydev->addr) {
375 switch(mii_data->reg_num) { 375 switch(mii_data->reg_num) {
376 case MII_BMCR: 376 case MII_BMCR:
377 if (val & (BMCR_RESET|BMCR_ANENABLE)) 377 if ((val & (BMCR_RESET|BMCR_ANENABLE)) == 0)
378 phydev->autoneg = AUTONEG_DISABLE; 378 phydev->autoneg = AUTONEG_DISABLE;
379 else 379 else
380 phydev->autoneg = AUTONEG_ENABLE; 380 phydev->autoneg = AUTONEG_ENABLE;