net: phy: don't use 10BaseT/half as default in genphy_read_status
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 18 Feb 2019 19:29:36 +0000 (20:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Feb 2019 20:57:25 +0000 (12:57 -0800)
If link partner and we can't agree on any mode, then it doesn't make
sense to pretend we would have agreed on 10/half. Therefore set a
proper default.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c

index 803197fdd87de23ff373d4482df8e6d6c2fa5724..4bb3b6c2894e67aded2bbbc7960e2c2e665ae318 100644 (file)
@@ -1785,8 +1785,8 @@ int genphy_read_status(struct phy_device *phydev)
 
                mii_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa);
 
-               phydev->speed = SPEED_10;
-               phydev->duplex = DUPLEX_HALF;
+               phydev->speed = SPEED_UNKNOWN;
+               phydev->duplex = DUPLEX_UNKNOWN;
                phydev->pause = 0;
                phydev->asym_pause = 0;