]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: setup routing table
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 6 Nov 2017 21:11:51 +0000 (16:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Nov 2017 00:26:49 +0000 (09:26 +0900)
commitec384be24b838ad1057bf86bed506294c5f69683
tree0d4c1068c05cf00c93d2032186b860546c8caa6b
parent081010e2739c9da2d370994aedd2c36bb81112e7
net: dsa: setup routing table

The *_complete() functions take too much arguments to do only one thing:
they try to fetch the dsa_port structures corresponding to device nodes
under the "link" list property of DSA ports, and use them to setup the
routing table of switches.

This patch simplifies them by providing instead simpler
dsa_{port,switch,tree}_setup_routing_table functions which return a
boolean value, true if the tree is complete.

dsa_tree_setup_routing_table is called inside dsa_tree_setup which
simplifies the switch registering function as well.

A switch's routing table is now initialized before its setup.

This also makes dsa_port_is_valid obsolete, remove it.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa2.c