diff options
author | David S. Miller <davem@davemloft.net> | 2017-09-22 00:20:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-22 00:20:41 +0200 |
commit | 59ec693a45b9bc0a3977552bc3421202fd7fb2f1 (patch) | |
tree | 57371b4d3fe35501bed2627b66218a2b93ff39d5 /drivers | |
parent | net: qcom/emac: add software control for pause frame mode (diff) | |
parent | net: phy: Keep reporting transceiver type (diff) | |
download | linux-59ec693a45b9bc0a3977552bc3421202fd7fb2f1.tar.xz linux-59ec693a45b9bc0a3977552bc3421202fd7fb2f1.zip |
Merge branch 'phylib-xcvr-type'
Florian Fainelli says:
====================
net: Bring back transceiver type for PHYLIB
With the introduction of the xLINKSETTINGS ethtool APIs, the transceiver type
was deprecated, but in that process we lost some useful information that PHYLIB
was consistently reporting about internal vs. external PHYs.
This brings back transceiver as a read-only field that is only consumed in the
legacy path where ETHTOOL_GET is called but the underlying drivers implement the
new style klink_settings API.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e842d2cd1ee7..2b1e67bc1e73 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -373,7 +373,8 @@ void phy_ethtool_ksettings_get(struct phy_device *phydev, cmd->base.port = PORT_BNC; else cmd->base.port = PORT_MII; - + cmd->base.transceiver = phy_is_internal(phydev) ? + XCVR_INTERNAL : XCVR_EXTERNAL; cmd->base.phy_address = phydev->mdio.addr; cmd->base.autoneg = phydev->autoneg; cmd->base.eth_tp_mdix_ctrl = phydev->mdix_ctrl; |