diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2016-06-09 17:42:08 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-09 22:12:49 -0700 |
commit | 9c57a77182c89e1bf773008f904f4a2e9ea30bd5 (patch) | |
tree | bdcbc21f19e56e036f83545f60347eb35ba50f52 /drivers/net/dsa/bcm_sf2.h | |
parent | 064523ff786093d81ae967959196c723d30f3da5 (diff) | |
download | linux-stable-9c57a77182c89e1bf773008f904f4a2e9ea30bd5.tar.gz linux-stable-9c57a77182c89e1bf773008f904f4a2e9ea30bd5.tar.bz2 linux-stable-9c57a77182c89e1bf773008f904f4a2e9ea30bd5.zip |
net: dsa: bcm_sf2: Add VLAN support
Add support for configuring VLANs on the Broadcom Starfigther2 switch.
This is all done through the bridge vlan facility just like other DSA
drivers.
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.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/dsa/bcm_sf2.h b/drivers/net/dsa/bcm_sf2.h index bde11ebb2742..463bed8cbe4c 100644 --- a/drivers/net/dsa/bcm_sf2.h +++ b/drivers/net/dsa/bcm_sf2.h @@ -21,6 +21,7 @@ #include <linux/ethtool.h> #include <linux/types.h> #include <linux/bitops.h> +#include <linux/if_vlan.h> #include <net/dsa.h> @@ -50,6 +51,7 @@ struct bcm_sf2_port_status { struct ethtool_eee eee; u32 vlan_ctl_mask; + u16 pvid; struct net_device *bridge_dev; }; @@ -63,6 +65,11 @@ struct bcm_sf2_arl_entry { u8 is_static:1; }; +struct bcm_sf2_vlan { + u16 members; + u16 untag; +}; + static inline void bcm_sf2_mac_from_u64(u64 src, u8 *dst) { unsigned int i; @@ -148,6 +155,9 @@ struct bcm_sf2_priv { struct device_node *master_mii_dn; struct mii_bus *slave_mii_bus; struct mii_bus *master_mii_bus; + + /* Cache of programmed VLANs */ + struct bcm_sf2_vlan vlans[VLAN_N_VID]; }; struct bcm_sf2_hw_stats { |