net: ethernet: Add helper for MACs which support asym pause
Rather than have the MAC drivers manipulate phydev members to indicate they support Asym Pause, add a helper function. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
41124fa64d
commit
af8d9bb2f2
@@ -1051,8 +1051,7 @@ static int smsc911x_mii_probe(struct net_device *dev)
|
||||
phy_set_max_speed(phydev, SPEED_100);
|
||||
|
||||
/* mask with MAC supported features */
|
||||
phydev->supported |= (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
|
||||
phydev->advertising = phydev->supported;
|
||||
phy_support_asym_pause(phydev);
|
||||
|
||||
pdata->last_duplex = -1;
|
||||
pdata->last_carrier = -1;
|
||||
|
@@ -1138,8 +1138,7 @@ static int smsc9420_mii_probe(struct net_device *dev)
|
||||
phy_set_max_speed(phydev, SPEED_100);
|
||||
|
||||
/* mask with MAC supported features */
|
||||
phydev->supported |= (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
|
||||
phydev->advertising = phydev->supported;
|
||||
phy_support_asym_pause(phydev);
|
||||
|
||||
phy_attached_info(phydev);
|
||||
|
||||
|
Reference in New Issue
Block a user