• Vivien Didelot's avatar
    net: dsa: setup routing table · 34c09a89
    Vivien Didelot authored
    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: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    34c09a89
dsa2.c 15.3 KB