• Vladimir Oltean's avatar
    net: dsa: introduce dsa_port_get_master() · 8f6a19c0
    Vladimir Oltean authored
    There is a desire to support for DSA masters in a LAG.
    
    That configuration is intended to work by simply enslaving the master to
    a bonding/team device. But the physical DSA master (the LAG slave) still
    has a dev->dsa_ptr, and that cpu_dp still corresponds to the physical
    CPU port.
    
    However, we would like to be able to retrieve the LAG that's the upper
    of the physical DSA master. In preparation for that, introduce a helper
    called dsa_port_get_master() that replaces all occurrences of the
    dp->cpu_dp->master pattern. The distinction between LAG and non-LAG will
    be made later within the helper itself.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    8f6a19c0
bcm_sf2.c 40.6 KB