net: ethernet: Add helper to remove a supported link mode
Some MAC hardware cannot support a subset of link modes. e.g. often 1Gbps Full duplex is supported, but Half duplex is not. Add a helper to remove such a link mode. 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
04b7d41d80
commit
41124fa64d
@@ -1013,7 +1013,7 @@ static int lan743x_phy_open(struct lan743x_adapter *adapter)
|
||||
goto return_error;
|
||||
|
||||
/* MAC doesn't support 1000T Half */
|
||||
phydev->supported &= ~SUPPORTED_1000baseT_Half;
|
||||
phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
|
||||
|
||||
/* support both flow controls */
|
||||
phy->fc_request_control = (FLOW_CTRL_RX | FLOW_CTRL_TX);
|
||||
|
Reference in New Issue
Block a user