net: dsa: microchip: Move *_port_setup code to dsa_switch_ops::port_setup()
Right now, the *_port_setup code is in dsa_switch_ops::port_enable(), which is not the best place for it. This patch moves it to a more suitable place, dsa_switch_ops::port_setup(), to match the function's purpose and name. This patch is a preparation for coming ACL support patch. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e03f0dfbdd
commit
152992279e
@ -2564,8 +2564,7 @@ static int ksz_port_mdb_del(struct dsa_switch *ds, int port,
|
||||
return dev->dev_ops->mdb_del(dev, port, mdb, db);
|
||||
}
|
||||
|
||||
static int ksz_enable_port(struct dsa_switch *ds, int port,
|
||||
struct phy_device *phy)
|
||||
static int ksz_port_setup(struct dsa_switch *ds, int port)
|
||||
{
|
||||
struct ksz_device *dev = ds->priv;
|
||||
|
||||
@ -3497,7 +3496,7 @@ static const struct dsa_switch_ops ksz_switch_ops = {
|
||||
.phylink_mac_config = ksz_phylink_mac_config,
|
||||
.phylink_mac_link_up = ksz_phylink_mac_link_up,
|
||||
.phylink_mac_link_down = ksz_mac_link_down,
|
||||
.port_enable = ksz_enable_port,
|
||||
.port_setup = ksz_port_setup,
|
||||
.set_ageing_time = ksz_set_ageing_time,
|
||||
.get_strings = ksz_get_strings,
|
||||
.get_ethtool_stats = ksz_get_ethtool_stats,
|
||||
|
Loading…
x
Reference in New Issue
Block a user