From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: [PATCH net-next v2 5/5] net: phy: phylink: Report MoCA as PORT_BNC Date: Tue, 12 Dec 2017 16:00:29 -0800 Message-ID: <20171213000029.8649-6-f.fainelli@gmail.com> References: <20171213000029.8649-1-f.fainelli@gmail.com> Cc: Florian Fainelli , rmk+kernel@armlinux.org.uk, davem@davemloft.net, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com To: netdev@vger.kernel.org Return-path: Received: from mail-oi0-f65.google.com ([209.85.218.65]:37051 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753154AbdLMAAo (ORCPT ); Tue, 12 Dec 2017 19:00:44 -0500 Received: by mail-oi0-f65.google.com with SMTP id y75so448528oie.4 for ; Tue, 12 Dec 2017 16:00:44 -0800 (PST) In-Reply-To: <20171213000029.8649-1-f.fainelli@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Similarly to what PHYLIB already does, make sure that PHY_INTERFACE_MODE_MOCA is reported as PORT_BNC. Signed-off-by: Florian Fainelli --- drivers/net/phy/phylink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.14.1