summaryrefslogtreecommitdiffstats
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/switchdev/switchdev.c')
-rw-r--r--net/switchdev/switchdev.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 5b1aa9f6f261..c457c1f73d35 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -104,7 +104,7 @@ int switchdev_port_attr_get(struct net_device *dev, struct switchdev_attr *attr)
104 struct net_device *lower_dev; 104 struct net_device *lower_dev;
105 struct list_head *iter; 105 struct list_head *iter;
106 struct switchdev_attr first = { 106 struct switchdev_attr first = {
107 .id = SWITCHDEV_ATTR_UNDEFINED 107 .id = SWITCHDEV_ATTR_ID_UNDEFINED
108 }; 108 };
109 int err = -EOPNOTSUPP; 109 int err = -EOPNOTSUPP;
110 110
@@ -124,7 +124,7 @@ int switchdev_port_attr_get(struct net_device *dev, struct switchdev_attr *attr)
124 err = switchdev_port_attr_get(lower_dev, attr); 124 err = switchdev_port_attr_get(lower_dev, attr);
125 if (err) 125 if (err)
126 break; 126 break;
127 if (first.id == SWITCHDEV_ATTR_UNDEFINED) 127 if (first.id == SWITCHDEV_ATTR_ID_UNDEFINED)
128 first = *attr; 128 first = *attr;
129 else if (memcmp(&first, attr, sizeof(*attr))) 129 else if (memcmp(&first, attr, sizeof(*attr)))
130 return -ENODATA; 130 return -ENODATA;
@@ -611,7 +611,7 @@ int switchdev_port_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
611 int nlflags) 611 int nlflags)
612{ 612{
613 struct switchdev_attr attr = { 613 struct switchdev_attr attr = {
614 .id = SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS, 614 .id = SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS,
615 }; 615 };
616 u16 mode = BRIDGE_MODE_UNDEF; 616 u16 mode = BRIDGE_MODE_UNDEF;
617 u32 mask = BR_LEARNING | BR_LEARNING_SYNC; 617 u32 mask = BR_LEARNING | BR_LEARNING_SYNC;
@@ -632,7 +632,7 @@ static int switchdev_port_br_setflag(struct net_device *dev,
632 unsigned long brport_flag) 632 unsigned long brport_flag)
633{ 633{
634 struct switchdev_attr attr = { 634 struct switchdev_attr attr = {
635 .id = SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS, 635 .id = SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS,
636 }; 636 };
637 u8 flag = nla_get_u8(nlattr); 637 u8 flag = nla_get_u8(nlattr);
638 int err; 638 int err;
@@ -958,7 +958,7 @@ static struct net_device *switchdev_get_lowest_dev(struct net_device *dev)
958static struct net_device *switchdev_get_dev_by_nhs(struct fib_info *fi) 958static struct net_device *switchdev_get_dev_by_nhs(struct fib_info *fi)
959{ 959{
960 struct switchdev_attr attr = { 960 struct switchdev_attr attr = {
961 .id = SWITCHDEV_ATTR_PORT_PARENT_ID, 961 .id = SWITCHDEV_ATTR_ID_PORT_PARENT_ID,
962 }; 962 };
963 struct switchdev_attr prev_attr; 963 struct switchdev_attr prev_attr;
964 struct net_device *dev = NULL; 964 struct net_device *dev = NULL;
@@ -1107,11 +1107,11 @@ static bool switchdev_port_same_parent_id(struct net_device *a,
1107 struct net_device *b) 1107 struct net_device *b)
1108{ 1108{
1109 struct switchdev_attr a_attr = { 1109 struct switchdev_attr a_attr = {
1110 .id = SWITCHDEV_ATTR_PORT_PARENT_ID, 1110 .id = SWITCHDEV_ATTR_ID_PORT_PARENT_ID,
1111 .flags = SWITCHDEV_F_NO_RECURSE, 1111 .flags = SWITCHDEV_F_NO_RECURSE,
1112 }; 1112 };
1113 struct switchdev_attr b_attr = { 1113 struct switchdev_attr b_attr = {
1114 .id = SWITCHDEV_ATTR_PORT_PARENT_ID, 1114 .id = SWITCHDEV_ATTR_ID_PORT_PARENT_ID,
1115 .flags = SWITCHDEV_F_NO_RECURSE, 1115 .flags = SWITCHDEV_F_NO_RECURSE,
1116 }; 1116 };
1117 1117