diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-05-11 13:06:37 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-05-12 16:39:18 -0700 |
commit | 7e708760fc114f049df9dccb994e23d20866b310 (patch) | |
tree | c6a4f19010382f197987d8b2d2ccda663c9596d2 /include/soc | |
parent | 6d0be600477089026c76fe529bd96fad4cf69c3b (diff) |
net: mscc: ocelot: move ocelot_port_private :: chip_port to ocelot_port :: index
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: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/soc')
-rw-r--r-- | include/soc/mscc/ocelot.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h index 904c15ca145e..3b8c5a54fb00 100644 --- a/include/soc/mscc/ocelot.h +++ b/include/soc/mscc/ocelot.h @@ -675,6 +675,8 @@ struct ocelot_port { u8 ptp_cmd; u8 ts_id; + u8 index; + u8 stp_state; bool vlan_aware; bool is_dsa_8021q_cpu; |