aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mv88e6xxx.h
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2015-03-26 18:36:38 -0700
committerDavid S. Miller <davem@davemloft.net>2015-03-29 13:23:54 -0700
commitdefb05b9b9b4376aeb9db366cdb6ffa5ef0fa176 (patch)
tree96414f84528f3dbec05d1280d878ebecb8c10945 /drivers/net/dsa/mv88e6xxx.h
parentnet: dsa: Add basic framework to support ndo_fdb functions (diff)
downloadlinux-dev-defb05b9b9b4376aeb9db366cdb6ffa5ef0fa176.tar.xz
linux-dev-defb05b9b9b4376aeb9db366cdb6ffa5ef0fa176.zip
net: dsa: mv88e6xxx: Add support for fdb_add, fdb_del, and fdb_getnext
No vlan support at this time. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/dsa/mv88e6xxx.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx.h
index 8e215ebc8d34..aaf239aba726 100644
--- a/drivers/net/dsa/mv88e6xxx.h
+++ b/drivers/net/dsa/mv88e6xxx.h
@@ -19,6 +19,8 @@
#define ATU_BUSY 0x8000
+#define ATU_CMD_LOAD_FID (ATU_BUSY | 0x3000)
+#define ATU_CMD_GETNEXT_FID (ATU_BUSY | 0x4000)
#define ATU_CMD_FLUSH_NONSTATIC_FID (ATU_BUSY | 0x6000)
/* port states */
@@ -29,6 +31,14 @@
#define PSTATE_LEARNING 0x02
#define PSTATE_FORWARDING 0x03
+/* FDB states */
+
+#define FDB_STATE_MASK 0x0f
+
+#define FDB_STATE_UNUSED 0x00
+#define FDB_STATE_MC_STATIC 0x07 /* static multicast */
+#define FDB_STATE_STATIC 0x0e /* static unicast */
+
struct mv88e6xxx_priv_state {
/* When using multi-chip addressing, this mutex protects
* access to the indirect access registers. (In single-chip
@@ -121,6 +131,12 @@ int mv88e6xxx_set_eee(struct dsa_switch *ds, int port,
int mv88e6xxx_join_bridge(struct dsa_switch *ds, int port, u32 br_port_mask);
int mv88e6xxx_leave_bridge(struct dsa_switch *ds, int port, u32 br_port_mask);
int mv88e6xxx_port_stp_update(struct dsa_switch *ds, int port, u8 state);
+int mv88e6xxx_port_fdb_add(struct dsa_switch *ds, int port,
+ const unsigned char *addr, u16 vid);
+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);
extern struct dsa_switch_driver mv88e6131_switch_driver;
extern struct dsa_switch_driver mv88e6123_61_65_switch_driver;