]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: introduce a dsa_switch_find function
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 10 May 2020 16:37:42 +0000 (19:37 +0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 11 May 2020 02:52:33 +0000 (19:52 -0700)
commitc5b9661eefcbfd3ba6a685989d4b976c705fdafb
tree8a6adf3d5acc84c8ed1530f3b8579e03dd7972c6
parent5d50e729ee3330657610d6c9c9f315fbe3b546d5
net: dsa: introduce a dsa_switch_find function

Somewhat similar to dsa_tree_find, dsa_switch_find returns a dsa_switch
structure pointer by searching for its tree index and switch index (the
parameters from dsa,member). To be used, for example, by drivers who
implement .crosschip_bridge_join and need a reference to the other
switch indicated to by the tree_index and sw_index arguments.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/dsa.h
net/dsa/dsa2.c