net: phy: update port type for MoCA PHYs
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 14 Feb 2014 00:08:43 +0000 (16:08 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Feb 2014 05:27:57 +0000 (00:27 -0500)
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>
drivers/net/phy/phy.c

index fc918b63dc65dbbbf138b55f747bf6795b1437bb..643b5d665f418d45d39e55e246ce33dd875158cc 100644 (file)
@@ -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;