aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/bcm_sf2.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2015-02-24 13:15:34 -0800
committerDavid S. Miller <davem@davemloft.net>2015-02-25 17:03:38 -0500
commit12f460f23423e81d6dd3efeb78906ae634ad8fc9 (patch)
treed0a46201df407c4719abade5cd44bcb86041b195 /drivers/net/dsa/bcm_sf2.h
parentnet: dsa: integrate with SWITCHDEV for HW bridging (diff)
downloadlinux-dev-12f460f23423e81d6dd3efeb78906ae634ad8fc9.tar.xz
linux-dev-12f460f23423e81d6dd3efeb78906ae634ad8fc9.zip
net: dsa: bcm_sf2: add HW bridging support
Implement the bridge join, leave and set_stp callbacks by making that we do the following: - when a port joins the bridge, all existing ports in the bridge get their VLAN control register updated with that joining port - the joining port is including all existing bridge ports in its own VLAN control register The leave operation is fairly similar, special care must be taken to make sure that port leaving the bridging is not removing itself from its own VLAN control register. Since the various BR_* states apply directly to our HW semantics, we just need to translate these constants into their corresponding HW settings, and voila! We make sure to trigger a fast-ageing process for ports that are joining/leaving the bridge and transition from incompatible states, this is equivalent to triggering an ARL flush for that port. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2.h')
-rw-r--r--drivers/net/dsa/bcm_sf2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/bcm_sf2.h b/drivers/net/dsa/bcm_sf2.h
index ee9f650d5026..0f217e99904f 100644
--- a/drivers/net/dsa/bcm_sf2.h
+++ b/drivers/net/dsa/bcm_sf2.h
@@ -46,6 +46,8 @@ struct bcm_sf2_port_status {
unsigned int link;
struct ethtool_eee eee;
+
+ u32 vlan_ctl_mask;
};
struct bcm_sf2_priv {