• Florian Fainelli's avatar
    net: dsa: b53: Configure VLANs while not filtering · ed409f3b
    Florian Fainelli authored
    Update the B53 driver to support VLANs while not filtering. This
    requires us to enable VLAN globally within the switch upon driver
    initial configuration (dev->vlan_enabled).
    
    We also need to remove the code that dealt with PVID re-configuration in
    b53_vlan_filtering() since that function worked under the assumption
    that it would only be called to make a bridge VLAN filtering, or not
    filtering, and we would attempt to move the port's PVID accordingly.
    
    Now that VLANs are programmed all the time, even in the case of a
    non-VLAN filtering bridge, we would be programming a default_pvid for
    the bridged switch ports.
    
    We need the DSA receive path to pop the VLAN tag if it is the bridge's
    default_pvid because the CPU port is always programmed tagged in the
    programmed VLANs. In order to do so we utilize the
    dsa_untag_bridge_pvid() helper introduced in the commit before within
    net/dsa/tag_brcm.c.
    Acked-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ed409f3b
b53_common.c 66.9 KB