aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorGravatar David S. Miller <davem@davemloft.net> 2017-09-21 15:20:41 -0700
committerGravatar David S. Miller <davem@davemloft.net> 2017-09-21 15:20:41 -0700
commit59ec693a45b9bc0a3977552bc3421202fd7fb2f1 (patch)
tree57371b4d3fe35501bed2627b66218a2b93ff39d5 /drivers/net
parentnet: qcom/emac: add software control for pause frame mode (diff)
parentnet: phy: Keep reporting transceiver type (diff)
downloadlinux-59ec693a45b9bc0a3977552bc3421202fd7fb2f1.tar.gz
linux-59ec693a45b9bc0a3977552bc3421202fd7fb2f1.tar.bz2
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/net')
-rw-r--r--drivers/net/phy/phy.c3
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;