net: phy: phylink: Report MoCA as PORT_BNC
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 13 Dec 2017 00:00:29 +0000 (16:00 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Dec 2017 20:55:01 +0000 (15:55 -0500)
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>
drivers/net/phy/phylink.c

index 1acdda6..c89b8c6 100644 (file)
@@ -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;