summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/lan9303.h
diff options
context:
space:
mode:
authorEgil Hjelmeland <privat@egil-hjelmeland.no>2017-10-10 14:49:53 +0200
committerDavid S. Miller <davem@davemloft.net>2017-10-11 13:53:21 -0700
commitd99a86ae83d28ad08bcd46570d81033b48db2ca0 (patch)
tree3305634ee07187260e5a9cc340d5c7a5ffc4407a /drivers/net/dsa/lan9303.h
parentf7e3bfa14daa35ea393ad6389c9e01e61196e93f (diff)
downloadlinux-d99a86ae83d28ad08bcd46570d81033b48db2ca0.tar.gz
net: dsa: lan9303: Add basic offloading of unicast traffic
When both user ports are joined to the same bridge, the normal HW MAC learning is enabled. This means that unicast traffic is forwarded in HW. If one of the user ports leave the bridge, the ports goes back to the initial separated operation. Port separation relies on disabled HW MAC learning. Hence the condition that both ports must join same bridge. Add brigde methods port_bridge_join, port_bridge_leave and port_stp_state_set. Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/lan9303.h')
-rw-r--r--drivers/net/dsa/lan9303.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/lan9303.h b/drivers/net/dsa/lan9303.h
index 4d8be555ff4d..68ecd544b658 100644
--- a/drivers/net/dsa/lan9303.h
+++ b/drivers/net/dsa/lan9303.h
@@ -21,6 +21,8 @@ struct lan9303 {
struct dsa_switch *ds;
struct mutex indirect_mutex; /* protect indexed register access */
const struct lan9303_phy_ops *ops;
+ bool is_bridged; /* true if port 1 and 2 are bridged */
+ u32 swe_port_state; /* remember SWE_PORT_STATE while not bridged */
};
extern const struct regmap_access_table lan9303_register_set;