Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a778e1b authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller
Browse files

net: dsa: change FDB routines prototypes



Change the prototype of port_getnext to include a vid parameter.

This is necessary to introduce the support for VLAN.

Also rename the fdb_{add,del,getnext} function pointers to
port_fdb_{add,del,getnext} since they are specific to a given port.

Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c5723ac5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -116,9 +116,9 @@ struct dsa_switch_driver mv88e6171_switch_driver = {
	.port_join_bridge       = mv88e6xxx_join_bridge,
	.port_leave_bridge      = mv88e6xxx_leave_bridge,
	.port_stp_update        = mv88e6xxx_port_stp_update,
	.fdb_add		= mv88e6xxx_port_fdb_add,
	.fdb_del		= mv88e6xxx_port_fdb_del,
	.fdb_getnext		= mv88e6xxx_port_fdb_getnext,
	.port_fdb_add		= mv88e6xxx_port_fdb_add,
	.port_fdb_del		= mv88e6xxx_port_fdb_del,
	.port_fdb_getnext	= mv88e6xxx_port_fdb_getnext,
};

MODULE_ALIAS("platform:mv88e6171");
+3 −3
Original line number Diff line number Diff line
@@ -343,9 +343,9 @@ struct dsa_switch_driver mv88e6352_switch_driver = {
	.port_join_bridge	= mv88e6xxx_join_bridge,
	.port_leave_bridge	= mv88e6xxx_leave_bridge,
	.port_stp_update	= mv88e6xxx_port_stp_update,
	.fdb_add		= mv88e6xxx_port_fdb_add,
	.fdb_del		= mv88e6xxx_port_fdb_del,
	.fdb_getnext		= mv88e6xxx_port_fdb_getnext,
	.port_fdb_add		= mv88e6xxx_port_fdb_add,
	.port_fdb_del		= mv88e6xxx_port_fdb_del,
	.port_fdb_getnext	= mv88e6xxx_port_fdb_getnext,
};

MODULE_ALIAS("platform:mv88e6172");
+1 −1
Original line number Diff line number Diff line
@@ -1310,7 +1310,7 @@ static int __mv88e6xxx_port_getnext(struct dsa_switch *ds, int port,

/* get next entry for port */
int mv88e6xxx_port_fdb_getnext(struct dsa_switch *ds, int port,
			       unsigned char *addr, bool *is_static)
			       unsigned char *addr, u16 *vid, bool *is_static)
{
	struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
	int ret;
+1 −1
Original line number Diff line number Diff line
@@ -421,7 +421,7 @@ int mv88e6xxx_port_fdb_add(struct dsa_switch *ds, int port,
int mv88e6xxx_port_fdb_del(struct dsa_switch *ds, int port,
			   const unsigned char *addr, u16 vid);
int mv88e6xxx_port_fdb_getnext(struct dsa_switch *ds, int port,
			       unsigned char *addr, bool *is_static);
			       unsigned char *addr, u16 *vid, bool *is_static);
int mv88e6xxx_phy_page_read(struct dsa_switch *ds, int port, int page, int reg);
int mv88e6xxx_phy_page_write(struct dsa_switch *ds, int port, int page,
			     int reg, int val);
+11 −6
Original line number Diff line number Diff line
@@ -296,12 +296,17 @@ struct dsa_switch_driver {
				     u32 br_port_mask);
	int	(*port_stp_update)(struct dsa_switch *ds, int port,
				   u8 state);
	int	(*fdb_add)(struct dsa_switch *ds, int port,

	/*
	 * Forwarding database
	 */
	int	(*port_fdb_add)(struct dsa_switch *ds, int port,
				const unsigned char *addr, u16 vid);
	int	(*fdb_del)(struct dsa_switch *ds, int port,
	int	(*port_fdb_del)(struct dsa_switch *ds, int port,
				const unsigned char *addr, u16 vid);
	int	(*fdb_getnext)(struct dsa_switch *ds, int port,
			       unsigned char *addr, bool *is_static);
	int	(*port_fdb_getnext)(struct dsa_switch *ds, int port,
				    unsigned char *addr, u16 *vid,
				    bool *is_static);
};

void register_switch_driver(struct dsa_switch_driver *type);
Loading