aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/dsa_loop.c
diff options
context:
space:
mode:
authorVladimir Oltean <[email protected]>2021-12-06 16:57:49 +0000
committerJakub Kicinski <[email protected]>2021-12-08 22:31:14 +0000
commit872bb81dfbc3811bc77aafd63deca73a08a9c20f (patch)
treeb54887840e55209905ac8c6350f1502ce5134a5b /drivers/net/dsa/dsa_loop.c
parentnet: dsa: assign a bridge number even without TX forwarding offload (diff)
downloadkernel-872bb81dfbc3811bc77aafd63deca73a08a9c20f.tar.gz
kernel-872bb81dfbc3811bc77aafd63deca73a08a9c20f.zip
net: dsa: mt7530: iterate using dsa_switch_for_each_user_port in bridging ops
Avoid repeated calls to dsa_to_port() (some hidden behind dsa_is_user_port and some in plain sight) by keeping two struct dsa_port references: one to the port passed as argument, and another to the other ports of the switch that we're iterating over. dsa_to_port(ds, i) gets replaced by other_dp, i gets replaced by other_port which is derived from other_dp->index, dsa_is_user_port is handled by the DSA iterator. Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
0 files changed, 0 insertions, 0 deletions