diff options
-rw-r--r-- | include/net/dsa.h | 5 | ||||
-rw-r--r-- | net/dsa/port.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index aab3c2029edd..4e0f7e9c5aa1 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -233,6 +233,11 @@ struct dsa_switch { */ bool vlan_filtering_is_global; + /* In case vlan_filtering_is_global is set, the VLAN awareness state + * should be retrieved from here and not from the per-port settings. + */ + bool vlan_filtering; + unsigned long *bitmap; unsigned long _bitmap; diff --git a/net/dsa/port.c b/net/dsa/port.c index 9a6ed138878c..c27c16b69ab6 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -208,7 +208,10 @@ int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering, if (err) return err; - dp->vlan_filtering = vlan_filtering; + if (ds->vlan_filtering_is_global) + ds->vlan_filtering = vlan_filtering; + else + dp->vlan_filtering = vlan_filtering; return 0; } |