]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: set up logical port IDs centrally
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 5 Feb 2021 22:02:16 +0000 (00:02 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 6 Feb 2021 22:51:50 +0000 (14:51 -0800)
commit5e7eb555dab8d6b51c820ba0345e18d3528ce768
treefbea694cd699fa529d693e82025e057a2544c69c
parent57d6083f4e699e0707f9f28afe8abe33ba84bd52
net: mscc: ocelot: set up logical port IDs centrally

The setup of logical port IDs is done in two places: from the inconclusively
named ocelot_setup_lag and from ocelot_port_lag_leave, a function that
also calls ocelot_setup_lag (which apparently does an incomplete setup
of the LAG).

To improve this situation, we can rename ocelot_setup_lag into
ocelot_setup_logical_port_ids, and drop the "lag" argument. It will now
set up the logical port IDs of all switch ports, which may be just
slightly more inefficient but more maintainable.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mscc/ocelot.c