• Vladimir Oltean's avatar
    net: mscc: ocelot: move ocelot_port_private :: chip_port to ocelot_port :: index · 7e708760
    Vladimir Oltean authored
    Currently the ocelot switch lib is unaware of the index of a struct
    ocelot_port, since that is kept in the encapsulating structures of outer
    drivers (struct dsa_port :: index, struct ocelot_port_private :: chip_port).
    
    With the upcoming increase in complexity associated with assigning DSA
    tag_8021q CPU ports to certain user ports, it becomes necessary for the
    switch lib to be able to retrieve the index of a certain ocelot_port.
    
    Therefore, introduce a new u8 to ocelot_port (same size as the chip_port
    used by the ocelot switchdev driver) and rework the existing code to
    populate and use it.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    7e708760
ocelot.h 3.68 KB