aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_netlink.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-07-06 00:26:27 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-06 00:26:27 -0400
commitb3ce0325f2bf1bb737cb8fc7c349ce8fefdd9e40 (patch)
treef2925e18555561b528b781c535c96bdbc0c809a9 /net/8021q/vlan_netlink.c
parenteca9ebac651f774d8b10fce7c5d173c3c3d3394f (diff)
vlan: Change vlan_dev_set_vlan_flag() to handle multiple flags at once
Change vlan_dev_set_vlan_flag() to handle multiple flags at once and rename to vlan_dev_change_flags(). This allows to to use it from the netlink interface, which in turn allows to handle necessary adjustments when changing flags centrally. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan_netlink.c')
-rw-r--r--net/8021q/vlan_netlink.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index c93e69ec28ed..fd7cb195d53f 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -75,7 +75,6 @@ static int vlan_validate(struct nlattr *tb[], struct nlattr *data[])
75static int vlan_changelink(struct net_device *dev, 75static int vlan_changelink(struct net_device *dev,
76 struct nlattr *tb[], struct nlattr *data[]) 76 struct nlattr *tb[], struct nlattr *data[])
77{ 77{
78 struct vlan_dev_info *vlan = vlan_dev_info(dev);
79 struct ifla_vlan_flags *flags; 78 struct ifla_vlan_flags *flags;
80 struct ifla_vlan_qos_mapping *m; 79 struct ifla_vlan_qos_mapping *m;
81 struct nlattr *attr; 80 struct nlattr *attr;
@@ -83,8 +82,7 @@ static int vlan_changelink(struct net_device *dev,
83 82
84 if (data[IFLA_VLAN_FLAGS]) { 83 if (data[IFLA_VLAN_FLAGS]) {
85 flags = nla_data(data[IFLA_VLAN_FLAGS]); 84 flags = nla_data(data[IFLA_VLAN_FLAGS]);
86 vlan->flags = (vlan->flags & ~flags->mask) | 85 vlan_dev_change_flags(dev, flags->flags, flags->mask);
87 (flags->flags & flags->mask);
88 } 86 }
89 if (data[IFLA_VLAN_INGRESS_QOS]) { 87 if (data[IFLA_VLAN_INGRESS_QOS]) {
90 nla_for_each_nested(attr, data[IFLA_VLAN_INGRESS_QOS], rem) { 88 nla_for_each_nested(attr, data[IFLA_VLAN_INGRESS_QOS], rem) {