Skip to content

Commit c88838c

Browse files
ffainellidavem330
authored andcommitted
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>
1 parent fd70f72 commit c88838c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/phy/phy.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd)
305305

306306
ethtool_cmd_speed_set(cmd, phydev->speed);
307307
cmd->duplex = phydev->duplex;
308-
cmd->port = PORT_MII;
308+
if (phydev->interface == PHY_INTERFACE_MODE_MOCA)
309+
cmd->port = PORT_BNC;
310+
else
311+
cmd->port = PORT_MII;
309312
cmd->phy_address = phydev->addr;
310313
cmd->transceiver = phy_is_internal(phydev) ?
311314
XCVR_INTERNAL : XCVR_EXTERNAL;

0 commit comments

Comments
 (0)