Commit 75db72de authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'restructure-struct-ocelot_port'

Vladimir Oltean says:

====================
Restructure struct ocelot_port

This patch set represents preparation for further work. It adds an
"index" field to struct ocelot_port, and populates it from the Felix DSA
driver and Ocelot switchdev driver.

The users of struct ocelot_port :: index are the same users as those of
struct ocelot_port_private :: chip_port.
====================

Link: https://lore.kernel.org/r/20220511100637.568950-1-vladimir.oltean@nxp.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 879c610c 7e708760
......@@ -1249,6 +1249,7 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
ocelot_port->phy_mode = port_phy_modes[port];
ocelot_port->ocelot = ocelot;
ocelot_port->target = target;
ocelot_port->index = port;
ocelot->ports[port] = ocelot_port;
}
......
......@@ -48,7 +48,6 @@ struct ocelot_port_private {
struct net_device *dev;
struct phylink *phylink;
struct phylink_config phylink_config;
u8 chip_port;
struct ocelot_port_tc tc;
};
......
This diff is collapsed.
......@@ -659,29 +659,32 @@ struct ocelot_port {
struct regmap *target;
bool vlan_aware;
struct net_device *bond;
struct net_device *bridge;
/* VLAN that untagged frames are classified to, on ingress */
const struct ocelot_bridge_vlan *pvid_vlan;
phy_interface_t phy_mode;
unsigned int ptp_skbs_in_flight;
u8 ptp_cmd;
struct sk_buff_head tx_skbs;
u16 mrp_ring_id;
u8 ptp_cmd;
u8 ts_id;
phy_interface_t phy_mode;
u8 index;
u8 *xmit_template;
u8 stp_state;
bool vlan_aware;
bool is_dsa_8021q_cpu;
bool learn_ena;
struct net_device *bond;
bool lag_tx_active;
u16 mrp_ring_id;
struct net_device *bridge;
int bridge_num;
u8 stp_state;
int speed;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment