• Vladimir Oltean's avatar
    net: mscc: ocelot: switch from {,un}set to {,un}assign for tag_8021q CPU ports · c295f983
    Vladimir Oltean authored
    There is a desire for the felix driver to gain support for multiple
    tag_8021q CPU ports, but the current model prevents it.
    
    This is because ocelot_apply_bridge_fwd_mask() only takes into
    consideration whether a port is a tag_8021q CPU port, but not whose CPU
    port it is.
    
    We need a model where we can have a direct affinity between an ocelot
    port and a tag_8021q CPU port. This serves as the basis for multiple CPU
    ports.
    
    Declare a "dsa_8021q_cpu" backpointer in struct ocelot_port which
    encodes that affinity. Repurpose the "ocelot_set_dsa_8021q_cpu" API to
    "ocelot_assign_dsa_8021q_cpu" to express the change of paradigm.
    
    Note that this change makes the first practical use of the new
    ocelot_port->index field in ocelot_port_unassign_dsa_8021q_cpu(), where
    we need to remove the old tag_8021q CPU port from the reserved VLAN range.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c295f983
felix.c 50.8 KB