summaryrefslogtreecommitdiff
path: root/drivers/net/phy/bcm87xx.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2018-11-11 01:43:33 +0300
committerDavid S. Miller <davem@davemloft.net>2018-11-11 21:10:01 +0300
commit3c1bcc8614db10803f1f57ef0295363917448cb2 (patch)
tree431ae141dae05b86ff2e3f39406436c1d9721a63 /drivers/net/phy/bcm87xx.c
parent899a3cbbf77a2a3d6d53d67ff6f10ad59eb03605 (diff)
downloadlinux-3c1bcc8614db10803f1f57ef0295363917448cb2.tar.xz
net: ethernet: Convert phydev advertize and supported from u32 to link mode
There are a few MAC/PHYs combinations which now support > 1Gbps. These may need to make use of link modes with bits > 31. Thus their supported PHY features or advertised features cannot be implemented using the current bitmap in a u32. Convert to using a linkmode bitmap, which can support all the currently devices link modes, and is future proof as more modes are added. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/bcm87xx.c')
-rw-r--r--drivers/net/phy/bcm87xx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/phy/bcm87xx.c b/drivers/net/phy/bcm87xx.c
index 64d5ba7bf94f..1b350183bffb 100644
--- a/drivers/net/phy/bcm87xx.c
+++ b/drivers/net/phy/bcm87xx.c
@@ -86,8 +86,12 @@ static int bcm87xx_of_reg_init(struct phy_device *phydev)
static int bcm87xx_config_init(struct phy_device *phydev)
{
- phydev->supported = SUPPORTED_10000baseR_FEC;
- phydev->advertising = ADVERTISED_10000baseR_FEC;
+ linkmode_zero(phydev->supported);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_10000baseR_FEC_BIT,
+ phydev->supported);
+ linkmode_zero(phydev->advertising);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_10000baseR_FEC_BIT,
+ phydev->advertising);
phydev->state = PHY_NOLINK;
phydev->autoneg = AUTONEG_DISABLE;