summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli2014-02-14 01:08:43 +0100
committerDavid S. Miller2014-02-14 06:27:57 +0100
commitc88838ce89515331ac835a470dc51ddf574770b1 (patch)
treece2929ae61dc3c875179658796371a3db72a71a4
parentnet: phy: add MoCA PHY type (diff)
downloadkernel-qcow2-linux-c88838ce89515331ac835a470dc51ddf574770b1.tar.gz
kernel-qcow2-linux-c88838ce89515331ac835a470dc51ddf574770b1.tar.xz
kernel-qcow2-linux-c88838ce89515331ac835a470dc51ddf574770b1.zip
net: phy: update port type for MoCA PHYs
MoCA PHYs are using coaxial (BNC-like) connectors, update the transceiver port type when replying to ethtool. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/phy/phy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index fc918b63dc65..643b5d665f41 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -305,7 +305,10 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd)
ethtool_cmd_speed_set(cmd, phydev->speed);
cmd->duplex = phydev->duplex;
- cmd->port = PORT_MII;
+ if (phydev->interface == PHY_INTERFACE_MODE_MOCA)
+ cmd->port = PORT_BNC;
+ else
+ cmd->port = PORT_MII;
cmd->phy_address = phydev->addr;
cmd->transceiver = phy_is_internal(phydev) ?
XCVR_INTERNAL : XCVR_EXTERNAL;