Commit a2482d2c authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: dsa: b53: Plug in VLAN support

Add support for configuration VLANs on B53 devices by implementing the
port VLAN add/del/dump functions. We currently default to a behavior
which is equivalent to having VLAN filtering turned on, where all VLANs
not programmed into the VLAN port-based vector will be discarded on
ingress.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ff39c2d6
This diff is collapsed.
...@@ -69,6 +69,12 @@ struct b53_port { ...@@ -69,6 +69,12 @@ struct b53_port {
struct net_device *bridge_dev; struct net_device *bridge_dev;
}; };
struct b53_vlan {
u16 members;
u16 untag;
bool valid;
};
struct b53_device { struct b53_device {
struct dsa_switch *ds; struct dsa_switch *ds;
struct b53_platform_data *pdata; struct b53_platform_data *pdata;
...@@ -99,14 +105,13 @@ struct b53_device { ...@@ -99,14 +105,13 @@ struct b53_device {
/* Master MDIO bus we got probed from */ /* Master MDIO bus we got probed from */
struct mii_bus *bus; struct mii_bus *bus;
/* Slave MDIO bus we created */
struct mii_bus *slave_bus;
void *priv; void *priv;
/* run time configuration */ /* run time configuration */
unsigned enable_jumbo:1; bool enable_jumbo;
unsigned allow_vid_4095:1;
unsigned int num_vlans; unsigned int num_vlans;
struct b53_vlan *vlans;
unsigned int num_ports; unsigned int num_ports;
struct b53_port *ports; struct b53_port *ports;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment