• Vladimir Oltean's avatar
    net: dsa: eliminate dsa_switch_ops :: port_bridge_tx_fwd_{,un}offload · 857fdd74
    Vladimir Oltean authored
    We don't really need new switch API for these, and with new switches
    which intend to add support for this feature, it will become cumbersome
    to maintain.
    
    The change consists in restructuring the two drivers that implement this
    offload (sja1105 and mv88e6xxx) such that the offload is enabled and
    disabled from the ->port_bridge_{join,leave} methods instead of the old
    ->port_bridge_tx_fwd_{,un}offload.
    
    The only non-trivial change is that mv88e6xxx_map_virtual_bridge_to_pvt()
    has been moved to avoid a forward declaration, and the
    mv88e6xxx_reg_lock() calls from inside it have been removed, since
    locking is now done from mv88e6xxx_port_bridge_{join,leave}.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: default avatarAlvin Šipraga <alsi@bang-olufsen.dk>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    857fdd74
dsa.h 37.2 KB