aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phylink.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-12-12 16:00:29 -0800
committerDavid S. Miller <davem@davemloft.net>2017-12-13 15:55:01 -0500
commit4be11ef0bdf5b3a4861d5b65bcdf32f2bfbc5263 (patch)
tree75716a3ae3b78d78cd8f0c1ddd0c5218e6b98881 /drivers/net/phy/phylink.c
parentnet: phy: phylink: Allow setting a custom link state callback (diff)
downloadlinux-dev-4be11ef0bdf5b3a4861d5b65bcdf32f2bfbc5263.tar.xz
linux-dev-4be11ef0bdf5b3a4861d5b65bcdf32f2bfbc5263.zip
net: phy: phylink: Report MoCA as PORT_BNC
Similarly to what PHYLIB already does, make sure that PHY_INTERFACE_MODE_MOCA is reported as PORT_BNC. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/phy/phylink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 1acdda69b3c6..c89b8c63f16a 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -556,7 +556,10 @@ struct phylink *phylink_create(struct net_device *ndev,
pl->netdev = ndev;
pl->phy_state.interface = iface;
pl->link_interface = iface;
- pl->link_port = PORT_MII;
+ if (iface == PHY_INTERFACE_MODE_MOCA)
+ pl->link_port = PORT_BNC;
+ else
+ pl->link_port = PORT_MII;
pl->link_config.interface = iface;
pl->link_config.pause = MLO_PAUSE_AN;
pl->link_config.speed = SPEED_UNKNOWN;