|
@@ -1880,20 +1880,17 @@ EXPORT_SYMBOL(genphy_loopback);
|
|
|
|
|
|
static int __set_phy_supported(struct phy_device *phydev, u32 max_speed)
|
|
static int __set_phy_supported(struct phy_device *phydev, u32 max_speed)
|
|
{
|
|
{
|
|
- phydev->supported &= ~(PHY_1000BT_FEATURES | PHY_100BT_FEATURES |
|
|
|
|
- PHY_10BT_FEATURES);
|
|
|
|
-
|
|
|
|
switch (max_speed) {
|
|
switch (max_speed) {
|
|
- default:
|
|
|
|
- return -ENOTSUPP;
|
|
|
|
- case SPEED_1000:
|
|
|
|
- phydev->supported |= PHY_1000BT_FEATURES;
|
|
|
|
|
|
+ case SPEED_10:
|
|
|
|
+ phydev->supported &= ~PHY_100BT_FEATURES;
|
|
/* fall through */
|
|
/* fall through */
|
|
case SPEED_100:
|
|
case SPEED_100:
|
|
- phydev->supported |= PHY_100BT_FEATURES;
|
|
|
|
- /* fall through */
|
|
|
|
- case SPEED_10:
|
|
|
|
- phydev->supported |= PHY_10BT_FEATURES;
|
|
|
|
|
|
+ phydev->supported &= ~PHY_1000BT_FEATURES;
|
|
|
|
+ break;
|
|
|
|
+ case SPEED_1000:
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ return -ENOTSUPP;
|
|
}
|
|
}
|
|
|
|
|
|
return 0;
|
|
return 0;
|