|
@@ -725,6 +725,22 @@ static ssize_t vlan_protocol_store(struct device *d,
|
|
|
return store_bridge_parm(d, buf, len, br_vlan_set_proto);
|
|
|
}
|
|
|
static DEVICE_ATTR_RW(vlan_protocol);
|
|
|
+
|
|
|
+static ssize_t default_pvid_show(struct device *d,
|
|
|
+ struct device_attribute *attr,
|
|
|
+ char *buf)
|
|
|
+{
|
|
|
+ struct net_bridge *br = to_bridge(d);
|
|
|
+ return sprintf(buf, "%d\n", br->default_pvid);
|
|
|
+}
|
|
|
+
|
|
|
+static ssize_t default_pvid_store(struct device *d,
|
|
|
+ struct device_attribute *attr,
|
|
|
+ const char *buf, size_t len)
|
|
|
+{
|
|
|
+ return store_bridge_parm(d, buf, len, br_vlan_set_default_pvid);
|
|
|
+}
|
|
|
+static DEVICE_ATTR_RW(default_pvid);
|
|
|
#endif
|
|
|
|
|
|
static struct attribute *bridge_attrs[] = {
|
|
@@ -771,6 +787,7 @@ static struct attribute *bridge_attrs[] = {
|
|
|
#ifdef CONFIG_BRIDGE_VLAN_FILTERING
|
|
|
&dev_attr_vlan_filtering.attr,
|
|
|
&dev_attr_vlan_protocol.attr,
|
|
|
+ &dev_attr_default_pvid.attr,
|
|
|
#endif
|
|
|
NULL
|
|
|
};
|