]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ocelot_net: populate supported_interfaces member
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 16 Nov 2021 10:09:31 +0000 (10:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Nov 2021 11:25:45 +0000 (11:25 +0000)
Populate the phy interface mode bitmap for the MSCC Ocelot driver with
the interface modes supported by the MAC.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot_net.c

index eaeba60b1bba5ef47a0bbb60a3e9a48e8c92cdb6..37c158df60ce3b7a259b3037f8247b6085dec3f5 100644 (file)
@@ -1655,6 +1655,9 @@ static int ocelot_port_phylink_create(struct ocelot *ocelot, int port,
        priv->phylink_config.dev = &priv->dev->dev;
        priv->phylink_config.type = PHYLINK_NETDEV;
 
+       __set_bit(ocelot_port->phy_mode,
+                 priv->phylink_config.supported_interfaces);
+
        phylink = phylink_create(&priv->phylink_config,
                                 of_fwnode_handle(portnp),
                                 phy_mode, &ocelot_phylink_ops);