diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-12-07 23:11:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-08 19:51:30 -0500 |
commit | 7da82c06ded105bf601bfa0eafc92e84eb0ceeed (patch) | |
tree | 68d8787014addfab287626fcf36446437df9c7aa /net/8021q | |
parent | 6626873980475f303367f7b709f4703b571cf854 (diff) |
vlan: rename vlan_dev_info to vlan_dev_priv
As this structure is priv, name it approprietely. Also for pointer to it
use name "vlan".
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan.c | 24 | ||||
-rw-r--r-- | net/8021q/vlan.h | 8 | ||||
-rw-r--r-- | net/8021q/vlan_core.c | 8 | ||||
-rw-r--r-- | net/8021q/vlan_dev.c | 72 | ||||
-rw-r--r-- | net/8021q/vlan_gvrp.c | 4 | ||||
-rw-r--r-- | net/8021q/vlan_netlink.c | 10 | ||||
-rw-r--r-- | net/8021q/vlanproc.c | 42 |
7 files changed, 84 insertions, 84 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 5471628d3ffe..e075625efeeb 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -99,7 +99,7 @@ static void vlan_rcu_free(struct rcu_head *rcu) | |||
99 | 99 | ||
100 | void unregister_vlan_dev(struct net_device *dev, struct list_head *head) | 100 | void unregister_vlan_dev(struct net_device *dev, struct list_head *head) |
101 | { | 101 | { |
102 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 102 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
103 | struct net_device *real_dev = vlan->real_dev; | 103 | struct net_device *real_dev = vlan->real_dev; |
104 | const struct net_device_ops *ops = real_dev->netdev_ops; | 104 | const struct net_device_ops *ops = real_dev->netdev_ops; |
105 | struct vlan_group *grp; | 105 | struct vlan_group *grp; |
@@ -167,7 +167,7 @@ int vlan_check_real_dev(struct net_device *real_dev, u16 vlan_id) | |||
167 | 167 | ||
168 | int register_vlan_dev(struct net_device *dev) | 168 | int register_vlan_dev(struct net_device *dev) |
169 | { | 169 | { |
170 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 170 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
171 | struct net_device *real_dev = vlan->real_dev; | 171 | struct net_device *real_dev = vlan->real_dev; |
172 | const struct net_device_ops *ops = real_dev->netdev_ops; | 172 | const struct net_device_ops *ops = real_dev->netdev_ops; |
173 | u16 vlan_id = vlan->vlan_id; | 173 | u16 vlan_id = vlan->vlan_id; |
@@ -192,7 +192,7 @@ int register_vlan_dev(struct net_device *dev) | |||
192 | if (err < 0) | 192 | if (err < 0) |
193 | goto out_uninit_applicant; | 193 | goto out_uninit_applicant; |
194 | 194 | ||
195 | /* Account for reference in struct vlan_dev_info */ | 195 | /* Account for reference in struct vlan_dev_priv */ |
196 | dev_hold(real_dev); | 196 | dev_hold(real_dev); |
197 | 197 | ||
198 | netif_stacked_transfer_operstate(real_dev, dev); | 198 | netif_stacked_transfer_operstate(real_dev, dev); |
@@ -267,7 +267,7 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id) | |||
267 | snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id); | 267 | snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id); |
268 | } | 268 | } |
269 | 269 | ||
270 | new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name, vlan_setup); | 270 | new_dev = alloc_netdev(sizeof(struct vlan_dev_priv), name, vlan_setup); |
271 | 271 | ||
272 | if (new_dev == NULL) | 272 | if (new_dev == NULL) |
273 | return -ENOBUFS; | 273 | return -ENOBUFS; |
@@ -278,10 +278,10 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id) | |||
278 | */ | 278 | */ |
279 | new_dev->mtu = real_dev->mtu; | 279 | new_dev->mtu = real_dev->mtu; |
280 | 280 | ||
281 | vlan_dev_info(new_dev)->vlan_id = vlan_id; | 281 | vlan_dev_priv(new_dev)->vlan_id = vlan_id; |
282 | vlan_dev_info(new_dev)->real_dev = real_dev; | 282 | vlan_dev_priv(new_dev)->real_dev = real_dev; |
283 | vlan_dev_info(new_dev)->dent = NULL; | 283 | vlan_dev_priv(new_dev)->dent = NULL; |
284 | vlan_dev_info(new_dev)->flags = VLAN_FLAG_REORDER_HDR; | 284 | vlan_dev_priv(new_dev)->flags = VLAN_FLAG_REORDER_HDR; |
285 | 285 | ||
286 | new_dev->rtnl_link_ops = &vlan_link_ops; | 286 | new_dev->rtnl_link_ops = &vlan_link_ops; |
287 | err = register_vlan_dev(new_dev); | 287 | err = register_vlan_dev(new_dev); |
@@ -298,7 +298,7 @@ out_free_newdev: | |||
298 | static void vlan_sync_address(struct net_device *dev, | 298 | static void vlan_sync_address(struct net_device *dev, |
299 | struct net_device *vlandev) | 299 | struct net_device *vlandev) |
300 | { | 300 | { |
301 | struct vlan_dev_info *vlan = vlan_dev_info(vlandev); | 301 | struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); |
302 | 302 | ||
303 | /* May be called without an actual change */ | 303 | /* May be called without an actual change */ |
304 | if (!compare_ether_addr(vlan->real_dev_addr, dev->dev_addr)) | 304 | if (!compare_ether_addr(vlan->real_dev_addr, dev->dev_addr)) |
@@ -362,7 +362,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
362 | struct vlan_group *grp; | 362 | struct vlan_group *grp; |
363 | int i, flgs; | 363 | int i, flgs; |
364 | struct net_device *vlandev; | 364 | struct net_device *vlandev; |
365 | struct vlan_dev_info *vlan; | 365 | struct vlan_dev_priv *vlan; |
366 | LIST_HEAD(list); | 366 | LIST_HEAD(list); |
367 | 367 | ||
368 | if (is_vlan_dev(dev)) | 368 | if (is_vlan_dev(dev)) |
@@ -447,7 +447,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
447 | if (!(flgs & IFF_UP)) | 447 | if (!(flgs & IFF_UP)) |
448 | continue; | 448 | continue; |
449 | 449 | ||
450 | vlan = vlan_dev_info(vlandev); | 450 | vlan = vlan_dev_priv(vlandev); |
451 | if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) | 451 | if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) |
452 | dev_change_flags(vlandev, flgs & ~IFF_UP); | 452 | dev_change_flags(vlandev, flgs & ~IFF_UP); |
453 | netif_stacked_transfer_operstate(dev, vlandev); | 453 | netif_stacked_transfer_operstate(dev, vlandev); |
@@ -465,7 +465,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
465 | if (flgs & IFF_UP) | 465 | if (flgs & IFF_UP) |
466 | continue; | 466 | continue; |
467 | 467 | ||
468 | vlan = vlan_dev_info(vlandev); | 468 | vlan = vlan_dev_priv(vlandev); |
469 | if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) | 469 | if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) |
470 | dev_change_flags(vlandev, flgs | IFF_UP); | 470 | dev_change_flags(vlandev, flgs | IFF_UP); |
471 | netif_stacked_transfer_operstate(dev, vlandev); | 471 | netif_stacked_transfer_operstate(dev, vlandev); |
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h index 9fd45f3571f9..d3c4ea4a3836 100644 --- a/net/8021q/vlan.h +++ b/net/8021q/vlan.h | |||
@@ -41,7 +41,7 @@ struct vlan_pcpu_stats { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * struct vlan_dev_info - VLAN private device data | 44 | * struct vlan_dev_priv - VLAN private device data |
45 | * @nr_ingress_mappings: number of ingress priority mappings | 45 | * @nr_ingress_mappings: number of ingress priority mappings |
46 | * @ingress_priority_map: ingress priority mappings | 46 | * @ingress_priority_map: ingress priority mappings |
47 | * @nr_egress_mappings: number of egress priority mappings | 47 | * @nr_egress_mappings: number of egress priority mappings |
@@ -53,7 +53,7 @@ struct vlan_pcpu_stats { | |||
53 | * @dent: proc dir entry | 53 | * @dent: proc dir entry |
54 | * @vlan_pcpu_stats: ptr to percpu rx stats | 54 | * @vlan_pcpu_stats: ptr to percpu rx stats |
55 | */ | 55 | */ |
56 | struct vlan_dev_info { | 56 | struct vlan_dev_priv { |
57 | unsigned int nr_ingress_mappings; | 57 | unsigned int nr_ingress_mappings; |
58 | u32 ingress_priority_map[8]; | 58 | u32 ingress_priority_map[8]; |
59 | unsigned int nr_egress_mappings; | 59 | unsigned int nr_egress_mappings; |
@@ -69,7 +69,7 @@ struct vlan_dev_info { | |||
69 | struct vlan_pcpu_stats __percpu *vlan_pcpu_stats; | 69 | struct vlan_pcpu_stats __percpu *vlan_pcpu_stats; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | static inline struct vlan_dev_info *vlan_dev_info(const struct net_device *dev) | 72 | static inline struct vlan_dev_priv *vlan_dev_priv(const struct net_device *dev) |
73 | { | 73 | { |
74 | return netdev_priv(dev); | 74 | return netdev_priv(dev); |
75 | } | 75 | } |
@@ -121,7 +121,7 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head); | |||
121 | static inline u32 vlan_get_ingress_priority(struct net_device *dev, | 121 | static inline u32 vlan_get_ingress_priority(struct net_device *dev, |
122 | u16 vlan_tci) | 122 | u16 vlan_tci) |
123 | { | 123 | { |
124 | struct vlan_dev_info *vip = vlan_dev_info(dev); | 124 | struct vlan_dev_priv *vip = vlan_dev_priv(dev); |
125 | 125 | ||
126 | return vip->ingress_priority_map[(vlan_tci >> VLAN_PRIO_SHIFT) & 0x7]; | 126 | return vip->ingress_priority_map[(vlan_tci >> VLAN_PRIO_SHIFT) & 0x7]; |
127 | } | 127 | } |
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 9c95e8e054f9..85241f044294 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -36,7 +36,7 @@ bool vlan_do_receive(struct sk_buff **skbp, bool last_handler) | |||
36 | skb->pkt_type = PACKET_HOST; | 36 | skb->pkt_type = PACKET_HOST; |
37 | } | 37 | } |
38 | 38 | ||
39 | if (!(vlan_dev_info(vlan_dev)->flags & VLAN_FLAG_REORDER_HDR)) { | 39 | if (!(vlan_dev_priv(vlan_dev)->flags & VLAN_FLAG_REORDER_HDR)) { |
40 | unsigned int offset = skb->data - skb_mac_header(skb); | 40 | unsigned int offset = skb->data - skb_mac_header(skb); |
41 | 41 | ||
42 | /* | 42 | /* |
@@ -55,7 +55,7 @@ bool vlan_do_receive(struct sk_buff **skbp, bool last_handler) | |||
55 | skb->priority = vlan_get_ingress_priority(vlan_dev, skb->vlan_tci); | 55 | skb->priority = vlan_get_ingress_priority(vlan_dev, skb->vlan_tci); |
56 | skb->vlan_tci = 0; | 56 | skb->vlan_tci = 0; |
57 | 57 | ||
58 | rx_stats = this_cpu_ptr(vlan_dev_info(vlan_dev)->vlan_pcpu_stats); | 58 | rx_stats = this_cpu_ptr(vlan_dev_priv(vlan_dev)->vlan_pcpu_stats); |
59 | 59 | ||
60 | u64_stats_update_begin(&rx_stats->syncp); | 60 | u64_stats_update_begin(&rx_stats->syncp); |
61 | rx_stats->rx_packets++; | 61 | rx_stats->rx_packets++; |
@@ -90,13 +90,13 @@ EXPORT_SYMBOL(__vlan_find_dev_deep); | |||
90 | 90 | ||
91 | struct net_device *vlan_dev_real_dev(const struct net_device *dev) | 91 | struct net_device *vlan_dev_real_dev(const struct net_device *dev) |
92 | { | 92 | { |
93 | return vlan_dev_info(dev)->real_dev; | 93 | return vlan_dev_priv(dev)->real_dev; |
94 | } | 94 | } |
95 | EXPORT_SYMBOL(vlan_dev_real_dev); | 95 | EXPORT_SYMBOL(vlan_dev_real_dev); |
96 | 96 | ||
97 | u16 vlan_dev_vlan_id(const struct net_device *dev) | 97 | u16 vlan_dev_vlan_id(const struct net_device *dev) |
98 | { | 98 | { |
99 | return vlan_dev_info(dev)->vlan_id; | 99 | return vlan_dev_priv(dev)->vlan_id; |
100 | } | 100 | } |
101 | EXPORT_SYMBOL(vlan_dev_vlan_id); | 101 | EXPORT_SYMBOL(vlan_dev_vlan_id); |
102 | 102 | ||
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 2b5fcde1f629..3b4db82b016f 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -72,7 +72,7 @@ vlan_dev_get_egress_qos_mask(struct net_device *dev, struct sk_buff *skb) | |||
72 | { | 72 | { |
73 | struct vlan_priority_tci_mapping *mp; | 73 | struct vlan_priority_tci_mapping *mp; |
74 | 74 | ||
75 | mp = vlan_dev_info(dev)->egress_priority_map[(skb->priority & 0xF)]; | 75 | mp = vlan_dev_priv(dev)->egress_priority_map[(skb->priority & 0xF)]; |
76 | while (mp) { | 76 | while (mp) { |
77 | if (mp->priority == skb->priority) { | 77 | if (mp->priority == skb->priority) { |
78 | return mp->vlan_qos; /* This should already be shifted | 78 | return mp->vlan_qos; /* This should already be shifted |
@@ -103,10 +103,10 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, | |||
103 | u16 vlan_tci = 0; | 103 | u16 vlan_tci = 0; |
104 | int rc; | 104 | int rc; |
105 | 105 | ||
106 | if (!(vlan_dev_info(dev)->flags & VLAN_FLAG_REORDER_HDR)) { | 106 | if (!(vlan_dev_priv(dev)->flags & VLAN_FLAG_REORDER_HDR)) { |
107 | vhdr = (struct vlan_hdr *) skb_push(skb, VLAN_HLEN); | 107 | vhdr = (struct vlan_hdr *) skb_push(skb, VLAN_HLEN); |
108 | 108 | ||
109 | vlan_tci = vlan_dev_info(dev)->vlan_id; | 109 | vlan_tci = vlan_dev_priv(dev)->vlan_id; |
110 | vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb); | 110 | vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb); |
111 | vhdr->h_vlan_TCI = htons(vlan_tci); | 111 | vhdr->h_vlan_TCI = htons(vlan_tci); |
112 | 112 | ||
@@ -129,7 +129,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, | |||
129 | saddr = dev->dev_addr; | 129 | saddr = dev->dev_addr; |
130 | 130 | ||
131 | /* Now make the underlying real hard header */ | 131 | /* Now make the underlying real hard header */ |
132 | dev = vlan_dev_info(dev)->real_dev; | 132 | dev = vlan_dev_priv(dev)->real_dev; |
133 | rc = dev_hard_header(skb, dev, type, daddr, saddr, len + vhdrlen); | 133 | rc = dev_hard_header(skb, dev, type, daddr, saddr, len + vhdrlen); |
134 | if (rc > 0) | 134 | if (rc > 0) |
135 | rc += vhdrlen; | 135 | rc += vhdrlen; |
@@ -149,27 +149,27 @@ static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb, | |||
149 | * OTHER THINGS LIKE FDDI/TokenRing/802.3 SNAPs... | 149 | * OTHER THINGS LIKE FDDI/TokenRing/802.3 SNAPs... |
150 | */ | 150 | */ |
151 | if (veth->h_vlan_proto != htons(ETH_P_8021Q) || | 151 | if (veth->h_vlan_proto != htons(ETH_P_8021Q) || |
152 | vlan_dev_info(dev)->flags & VLAN_FLAG_REORDER_HDR) { | 152 | vlan_dev_priv(dev)->flags & VLAN_FLAG_REORDER_HDR) { |
153 | u16 vlan_tci; | 153 | u16 vlan_tci; |
154 | vlan_tci = vlan_dev_info(dev)->vlan_id; | 154 | vlan_tci = vlan_dev_priv(dev)->vlan_id; |
155 | vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb); | 155 | vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb); |
156 | skb = __vlan_hwaccel_put_tag(skb, vlan_tci); | 156 | skb = __vlan_hwaccel_put_tag(skb, vlan_tci); |
157 | } | 157 | } |
158 | 158 | ||
159 | skb_set_dev(skb, vlan_dev_info(dev)->real_dev); | 159 | skb_set_dev(skb, vlan_dev_priv(dev)->real_dev); |
160 | len = skb->len; | 160 | len = skb->len; |
161 | ret = dev_queue_xmit(skb); | 161 | ret = dev_queue_xmit(skb); |
162 | 162 | ||
163 | if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) { | 163 | if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) { |
164 | struct vlan_pcpu_stats *stats; | 164 | struct vlan_pcpu_stats *stats; |
165 | 165 | ||
166 | stats = this_cpu_ptr(vlan_dev_info(dev)->vlan_pcpu_stats); | 166 | stats = this_cpu_ptr(vlan_dev_priv(dev)->vlan_pcpu_stats); |
167 | u64_stats_update_begin(&stats->syncp); | 167 | u64_stats_update_begin(&stats->syncp); |
168 | stats->tx_packets++; | 168 | stats->tx_packets++; |
169 | stats->tx_bytes += len; | 169 | stats->tx_bytes += len; |
170 | u64_stats_update_end(&stats->syncp); | 170 | u64_stats_update_end(&stats->syncp); |
171 | } else { | 171 | } else { |
172 | this_cpu_inc(vlan_dev_info(dev)->vlan_pcpu_stats->tx_dropped); | 172 | this_cpu_inc(vlan_dev_priv(dev)->vlan_pcpu_stats->tx_dropped); |
173 | } | 173 | } |
174 | 174 | ||
175 | return ret; | 175 | return ret; |
@@ -180,7 +180,7 @@ static int vlan_dev_change_mtu(struct net_device *dev, int new_mtu) | |||
180 | /* TODO: gotta make sure the underlying layer can handle it, | 180 | /* TODO: gotta make sure the underlying layer can handle it, |
181 | * maybe an IFF_VLAN_CAPABLE flag for devices? | 181 | * maybe an IFF_VLAN_CAPABLE flag for devices? |
182 | */ | 182 | */ |
183 | if (vlan_dev_info(dev)->real_dev->mtu < new_mtu) | 183 | if (vlan_dev_priv(dev)->real_dev->mtu < new_mtu) |
184 | return -ERANGE; | 184 | return -ERANGE; |
185 | 185 | ||
186 | dev->mtu = new_mtu; | 186 | dev->mtu = new_mtu; |
@@ -191,7 +191,7 @@ static int vlan_dev_change_mtu(struct net_device *dev, int new_mtu) | |||
191 | void vlan_dev_set_ingress_priority(const struct net_device *dev, | 191 | void vlan_dev_set_ingress_priority(const struct net_device *dev, |
192 | u32 skb_prio, u16 vlan_prio) | 192 | u32 skb_prio, u16 vlan_prio) |
193 | { | 193 | { |
194 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 194 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
195 | 195 | ||
196 | if (vlan->ingress_priority_map[vlan_prio & 0x7] && !skb_prio) | 196 | if (vlan->ingress_priority_map[vlan_prio & 0x7] && !skb_prio) |
197 | vlan->nr_ingress_mappings--; | 197 | vlan->nr_ingress_mappings--; |
@@ -204,7 +204,7 @@ void vlan_dev_set_ingress_priority(const struct net_device *dev, | |||
204 | int vlan_dev_set_egress_priority(const struct net_device *dev, | 204 | int vlan_dev_set_egress_priority(const struct net_device *dev, |
205 | u32 skb_prio, u16 vlan_prio) | 205 | u32 skb_prio, u16 vlan_prio) |
206 | { | 206 | { |
207 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 207 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
208 | struct vlan_priority_tci_mapping *mp = NULL; | 208 | struct vlan_priority_tci_mapping *mp = NULL; |
209 | struct vlan_priority_tci_mapping *np; | 209 | struct vlan_priority_tci_mapping *np; |
210 | u32 vlan_qos = (vlan_prio << VLAN_PRIO_SHIFT) & VLAN_PRIO_MASK; | 210 | u32 vlan_qos = (vlan_prio << VLAN_PRIO_SHIFT) & VLAN_PRIO_MASK; |
@@ -241,7 +241,7 @@ int vlan_dev_set_egress_priority(const struct net_device *dev, | |||
241 | /* Flags are defined in the vlan_flags enum in include/linux/if_vlan.h file. */ | 241 | /* Flags are defined in the vlan_flags enum in include/linux/if_vlan.h file. */ |
242 | int vlan_dev_change_flags(const struct net_device *dev, u32 flags, u32 mask) | 242 | int vlan_dev_change_flags(const struct net_device *dev, u32 flags, u32 mask) |
243 | { | 243 | { |
244 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 244 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
245 | u32 old_flags = vlan->flags; | 245 | u32 old_flags = vlan->flags; |
246 | 246 | ||
247 | if (mask & ~(VLAN_FLAG_REORDER_HDR | VLAN_FLAG_GVRP | | 247 | if (mask & ~(VLAN_FLAG_REORDER_HDR | VLAN_FLAG_GVRP | |
@@ -261,12 +261,12 @@ int vlan_dev_change_flags(const struct net_device *dev, u32 flags, u32 mask) | |||
261 | 261 | ||
262 | void vlan_dev_get_realdev_name(const struct net_device *dev, char *result) | 262 | void vlan_dev_get_realdev_name(const struct net_device *dev, char *result) |
263 | { | 263 | { |
264 | strncpy(result, vlan_dev_info(dev)->real_dev->name, 23); | 264 | strncpy(result, vlan_dev_priv(dev)->real_dev->name, 23); |
265 | } | 265 | } |
266 | 266 | ||
267 | static int vlan_dev_open(struct net_device *dev) | 267 | static int vlan_dev_open(struct net_device *dev) |
268 | { | 268 | { |
269 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 269 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
270 | struct net_device *real_dev = vlan->real_dev; | 270 | struct net_device *real_dev = vlan->real_dev; |
271 | int err; | 271 | int err; |
272 | 272 | ||
@@ -313,7 +313,7 @@ out: | |||
313 | 313 | ||
314 | static int vlan_dev_stop(struct net_device *dev) | 314 | static int vlan_dev_stop(struct net_device *dev) |
315 | { | 315 | { |
316 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 316 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
317 | struct net_device *real_dev = vlan->real_dev; | 317 | struct net_device *real_dev = vlan->real_dev; |
318 | 318 | ||
319 | dev_mc_unsync(real_dev, dev); | 319 | dev_mc_unsync(real_dev, dev); |
@@ -332,7 +332,7 @@ static int vlan_dev_stop(struct net_device *dev) | |||
332 | 332 | ||
333 | static int vlan_dev_set_mac_address(struct net_device *dev, void *p) | 333 | static int vlan_dev_set_mac_address(struct net_device *dev, void *p) |
334 | { | 334 | { |
335 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 335 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
336 | struct sockaddr *addr = p; | 336 | struct sockaddr *addr = p; |
337 | int err; | 337 | int err; |
338 | 338 | ||
@@ -358,7 +358,7 @@ out: | |||
358 | 358 | ||
359 | static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | 359 | static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) |
360 | { | 360 | { |
361 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 361 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
362 | const struct net_device_ops *ops = real_dev->netdev_ops; | 362 | const struct net_device_ops *ops = real_dev->netdev_ops; |
363 | struct ifreq ifrr; | 363 | struct ifreq ifrr; |
364 | int err = -EOPNOTSUPP; | 364 | int err = -EOPNOTSUPP; |
@@ -383,7 +383,7 @@ static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
383 | 383 | ||
384 | static int vlan_dev_neigh_setup(struct net_device *dev, struct neigh_parms *pa) | 384 | static int vlan_dev_neigh_setup(struct net_device *dev, struct neigh_parms *pa) |
385 | { | 385 | { |
386 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 386 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
387 | const struct net_device_ops *ops = real_dev->netdev_ops; | 387 | const struct net_device_ops *ops = real_dev->netdev_ops; |
388 | int err = 0; | 388 | int err = 0; |
389 | 389 | ||
@@ -397,7 +397,7 @@ static int vlan_dev_neigh_setup(struct net_device *dev, struct neigh_parms *pa) | |||
397 | static int vlan_dev_fcoe_ddp_setup(struct net_device *dev, u16 xid, | 397 | static int vlan_dev_fcoe_ddp_setup(struct net_device *dev, u16 xid, |
398 | struct scatterlist *sgl, unsigned int sgc) | 398 | struct scatterlist *sgl, unsigned int sgc) |
399 | { | 399 | { |
400 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 400 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
401 | const struct net_device_ops *ops = real_dev->netdev_ops; | 401 | const struct net_device_ops *ops = real_dev->netdev_ops; |
402 | int rc = 0; | 402 | int rc = 0; |
403 | 403 | ||
@@ -409,7 +409,7 @@ static int vlan_dev_fcoe_ddp_setup(struct net_device *dev, u16 xid, | |||
409 | 409 | ||
410 | static int vlan_dev_fcoe_ddp_done(struct net_device *dev, u16 xid) | 410 | static int vlan_dev_fcoe_ddp_done(struct net_device *dev, u16 xid) |
411 | { | 411 | { |
412 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 412 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
413 | const struct net_device_ops *ops = real_dev->netdev_ops; | 413 | const struct net_device_ops *ops = real_dev->netdev_ops; |
414 | int len = 0; | 414 | int len = 0; |
415 | 415 | ||
@@ -421,7 +421,7 @@ static int vlan_dev_fcoe_ddp_done(struct net_device *dev, u16 xid) | |||
421 | 421 | ||
422 | static int vlan_dev_fcoe_enable(struct net_device *dev) | 422 | static int vlan_dev_fcoe_enable(struct net_device *dev) |
423 | { | 423 | { |
424 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 424 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
425 | const struct net_device_ops *ops = real_dev->netdev_ops; | 425 | const struct net_device_ops *ops = real_dev->netdev_ops; |
426 | int rc = -EINVAL; | 426 | int rc = -EINVAL; |
427 | 427 | ||
@@ -432,7 +432,7 @@ static int vlan_dev_fcoe_enable(struct net_device *dev) | |||
432 | 432 | ||
433 | static int vlan_dev_fcoe_disable(struct net_device *dev) | 433 | static int vlan_dev_fcoe_disable(struct net_device *dev) |
434 | { | 434 | { |
435 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 435 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
436 | const struct net_device_ops *ops = real_dev->netdev_ops; | 436 | const struct net_device_ops *ops = real_dev->netdev_ops; |
437 | int rc = -EINVAL; | 437 | int rc = -EINVAL; |
438 | 438 | ||
@@ -443,7 +443,7 @@ static int vlan_dev_fcoe_disable(struct net_device *dev) | |||
443 | 443 | ||
444 | static int vlan_dev_fcoe_get_wwn(struct net_device *dev, u64 *wwn, int type) | 444 | static int vlan_dev_fcoe_get_wwn(struct net_device *dev, u64 *wwn, int type) |
445 | { | 445 | { |
446 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 446 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
447 | const struct net_device_ops *ops = real_dev->netdev_ops; | 447 | const struct net_device_ops *ops = real_dev->netdev_ops; |
448 | int rc = -EINVAL; | 448 | int rc = -EINVAL; |
449 | 449 | ||
@@ -455,7 +455,7 @@ static int vlan_dev_fcoe_get_wwn(struct net_device *dev, u64 *wwn, int type) | |||
455 | static int vlan_dev_fcoe_ddp_target(struct net_device *dev, u16 xid, | 455 | static int vlan_dev_fcoe_ddp_target(struct net_device *dev, u16 xid, |
456 | struct scatterlist *sgl, unsigned int sgc) | 456 | struct scatterlist *sgl, unsigned int sgc) |
457 | { | 457 | { |
458 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 458 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
459 | const struct net_device_ops *ops = real_dev->netdev_ops; | 459 | const struct net_device_ops *ops = real_dev->netdev_ops; |
460 | int rc = 0; | 460 | int rc = 0; |
461 | 461 | ||
@@ -468,7 +468,7 @@ static int vlan_dev_fcoe_ddp_target(struct net_device *dev, u16 xid, | |||
468 | 468 | ||
469 | static void vlan_dev_change_rx_flags(struct net_device *dev, int change) | 469 | static void vlan_dev_change_rx_flags(struct net_device *dev, int change) |
470 | { | 470 | { |
471 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 471 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
472 | 472 | ||
473 | if (dev->flags & IFF_UP) { | 473 | if (dev->flags & IFF_UP) { |
474 | if (change & IFF_ALLMULTI) | 474 | if (change & IFF_ALLMULTI) |
@@ -480,8 +480,8 @@ static void vlan_dev_change_rx_flags(struct net_device *dev, int change) | |||
480 | 480 | ||
481 | static void vlan_dev_set_rx_mode(struct net_device *vlan_dev) | 481 | static void vlan_dev_set_rx_mode(struct net_device *vlan_dev) |
482 | { | 482 | { |
483 | dev_mc_sync(vlan_dev_info(vlan_dev)->real_dev, vlan_dev); | 483 | dev_mc_sync(vlan_dev_priv(vlan_dev)->real_dev, vlan_dev); |
484 | dev_uc_sync(vlan_dev_info(vlan_dev)->real_dev, vlan_dev); | 484 | dev_uc_sync(vlan_dev_priv(vlan_dev)->real_dev, vlan_dev); |
485 | } | 485 | } |
486 | 486 | ||
487 | /* | 487 | /* |
@@ -519,7 +519,7 @@ static const struct net_device_ops vlan_netdev_ops; | |||
519 | 519 | ||
520 | static int vlan_dev_init(struct net_device *dev) | 520 | static int vlan_dev_init(struct net_device *dev) |
521 | { | 521 | { |
522 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 522 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
523 | int subclass = 0; | 523 | int subclass = 0; |
524 | 524 | ||
525 | netif_carrier_off(dev); | 525 | netif_carrier_off(dev); |
@@ -568,8 +568,8 @@ static int vlan_dev_init(struct net_device *dev) | |||
568 | 568 | ||
569 | vlan_dev_set_lockdep_class(dev, subclass); | 569 | vlan_dev_set_lockdep_class(dev, subclass); |
570 | 570 | ||
571 | vlan_dev_info(dev)->vlan_pcpu_stats = alloc_percpu(struct vlan_pcpu_stats); | 571 | vlan_dev_priv(dev)->vlan_pcpu_stats = alloc_percpu(struct vlan_pcpu_stats); |
572 | if (!vlan_dev_info(dev)->vlan_pcpu_stats) | 572 | if (!vlan_dev_priv(dev)->vlan_pcpu_stats) |
573 | return -ENOMEM; | 573 | return -ENOMEM; |
574 | 574 | ||
575 | return 0; | 575 | return 0; |
@@ -578,7 +578,7 @@ static int vlan_dev_init(struct net_device *dev) | |||
578 | static void vlan_dev_uninit(struct net_device *dev) | 578 | static void vlan_dev_uninit(struct net_device *dev) |
579 | { | 579 | { |
580 | struct vlan_priority_tci_mapping *pm; | 580 | struct vlan_priority_tci_mapping *pm; |
581 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 581 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
582 | int i; | 582 | int i; |
583 | 583 | ||
584 | free_percpu(vlan->vlan_pcpu_stats); | 584 | free_percpu(vlan->vlan_pcpu_stats); |
@@ -594,7 +594,7 @@ static void vlan_dev_uninit(struct net_device *dev) | |||
594 | static netdev_features_t vlan_dev_fix_features(struct net_device *dev, | 594 | static netdev_features_t vlan_dev_fix_features(struct net_device *dev, |
595 | netdev_features_t features) | 595 | netdev_features_t features) |
596 | { | 596 | { |
597 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 597 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; |
598 | u32 old_features = features; | 598 | u32 old_features = features; |
599 | 599 | ||
600 | features &= real_dev->vlan_features; | 600 | features &= real_dev->vlan_features; |
@@ -610,7 +610,7 @@ static netdev_features_t vlan_dev_fix_features(struct net_device *dev, | |||
610 | static int vlan_ethtool_get_settings(struct net_device *dev, | 610 | static int vlan_ethtool_get_settings(struct net_device *dev, |
611 | struct ethtool_cmd *cmd) | 611 | struct ethtool_cmd *cmd) |
612 | { | 612 | { |
613 | const struct vlan_dev_info *vlan = vlan_dev_info(dev); | 613 | const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
614 | 614 | ||
615 | return __ethtool_get_settings(vlan->real_dev, cmd); | 615 | return __ethtool_get_settings(vlan->real_dev, cmd); |
616 | } | 616 | } |
@@ -626,7 +626,7 @@ static void vlan_ethtool_get_drvinfo(struct net_device *dev, | |||
626 | static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) | 626 | static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) |
627 | { | 627 | { |
628 | 628 | ||
629 | if (vlan_dev_info(dev)->vlan_pcpu_stats) { | 629 | if (vlan_dev_priv(dev)->vlan_pcpu_stats) { |
630 | struct vlan_pcpu_stats *p; | 630 | struct vlan_pcpu_stats *p; |
631 | u32 rx_errors = 0, tx_dropped = 0; | 631 | u32 rx_errors = 0, tx_dropped = 0; |
632 | int i; | 632 | int i; |
@@ -635,7 +635,7 @@ static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, st | |||
635 | u64 rxpackets, rxbytes, rxmulticast, txpackets, txbytes; | 635 | u64 rxpackets, rxbytes, rxmulticast, txpackets, txbytes; |
636 | unsigned int start; | 636 | unsigned int start; |
637 | 637 | ||
638 | p = per_cpu_ptr(vlan_dev_info(dev)->vlan_pcpu_stats, i); | 638 | p = per_cpu_ptr(vlan_dev_priv(dev)->vlan_pcpu_stats, i); |
639 | do { | 639 | do { |
640 | start = u64_stats_fetch_begin_bh(&p->syncp); | 640 | start = u64_stats_fetch_begin_bh(&p->syncp); |
641 | rxpackets = p->rx_packets; | 641 | rxpackets = p->rx_packets; |
diff --git a/net/8021q/vlan_gvrp.c b/net/8021q/vlan_gvrp.c index 061ceceeef12..6f9755352760 100644 --- a/net/8021q/vlan_gvrp.c +++ b/net/8021q/vlan_gvrp.c | |||
@@ -29,7 +29,7 @@ static struct garp_application vlan_gvrp_app __read_mostly = { | |||
29 | 29 | ||
30 | int vlan_gvrp_request_join(const struct net_device *dev) | 30 | int vlan_gvrp_request_join(const struct net_device *dev) |
31 | { | 31 | { |
32 | const struct vlan_dev_info *vlan = vlan_dev_info(dev); | 32 | const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
33 | __be16 vlan_id = htons(vlan->vlan_id); | 33 | __be16 vlan_id = htons(vlan->vlan_id); |
34 | 34 | ||
35 | return garp_request_join(vlan->real_dev, &vlan_gvrp_app, | 35 | return garp_request_join(vlan->real_dev, &vlan_gvrp_app, |
@@ -38,7 +38,7 @@ int vlan_gvrp_request_join(const struct net_device *dev) | |||
38 | 38 | ||
39 | void vlan_gvrp_request_leave(const struct net_device *dev) | 39 | void vlan_gvrp_request_leave(const struct net_device *dev) |
40 | { | 40 | { |
41 | const struct vlan_dev_info *vlan = vlan_dev_info(dev); | 41 | const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
42 | __be16 vlan_id = htons(vlan->vlan_id); | 42 | __be16 vlan_id = htons(vlan->vlan_id); |
43 | 43 | ||
44 | garp_request_leave(vlan->real_dev, &vlan_gvrp_app, | 44 | garp_request_leave(vlan->real_dev, &vlan_gvrp_app, |
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index 235c2197dbb6..50711368ad6a 100644 --- a/net/8021q/vlan_netlink.c +++ b/net/8021q/vlan_netlink.c | |||
@@ -105,7 +105,7 @@ static int vlan_changelink(struct net_device *dev, | |||
105 | static int vlan_newlink(struct net *src_net, struct net_device *dev, | 105 | static int vlan_newlink(struct net *src_net, struct net_device *dev, |
106 | struct nlattr *tb[], struct nlattr *data[]) | 106 | struct nlattr *tb[], struct nlattr *data[]) |
107 | { | 107 | { |
108 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 108 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
109 | struct net_device *real_dev; | 109 | struct net_device *real_dev; |
110 | int err; | 110 | int err; |
111 | 111 | ||
@@ -149,7 +149,7 @@ static inline size_t vlan_qos_map_size(unsigned int n) | |||
149 | 149 | ||
150 | static size_t vlan_get_size(const struct net_device *dev) | 150 | static size_t vlan_get_size(const struct net_device *dev) |
151 | { | 151 | { |
152 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 152 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
153 | 153 | ||
154 | return nla_total_size(2) + /* IFLA_VLAN_ID */ | 154 | return nla_total_size(2) + /* IFLA_VLAN_ID */ |
155 | sizeof(struct ifla_vlan_flags) + /* IFLA_VLAN_FLAGS */ | 155 | sizeof(struct ifla_vlan_flags) + /* IFLA_VLAN_FLAGS */ |
@@ -159,14 +159,14 @@ static size_t vlan_get_size(const struct net_device *dev) | |||
159 | 159 | ||
160 | static int vlan_fill_info(struct sk_buff *skb, const struct net_device *dev) | 160 | static int vlan_fill_info(struct sk_buff *skb, const struct net_device *dev) |
161 | { | 161 | { |
162 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 162 | struct vlan_dev_priv *vlan = vlan_dev_priv(dev); |
163 | struct vlan_priority_tci_mapping *pm; | 163 | struct vlan_priority_tci_mapping *pm; |
164 | struct ifla_vlan_flags f; | 164 | struct ifla_vlan_flags f; |
165 | struct ifla_vlan_qos_mapping m; | 165 | struct ifla_vlan_qos_mapping m; |
166 | struct nlattr *nest; | 166 | struct nlattr *nest; |
167 | unsigned int i; | 167 | unsigned int i; |
168 | 168 | ||
169 | NLA_PUT_U16(skb, IFLA_VLAN_ID, vlan_dev_info(dev)->vlan_id); | 169 | NLA_PUT_U16(skb, IFLA_VLAN_ID, vlan_dev_priv(dev)->vlan_id); |
170 | if (vlan->flags) { | 170 | if (vlan->flags) { |
171 | f.flags = vlan->flags; | 171 | f.flags = vlan->flags; |
172 | f.mask = ~0; | 172 | f.mask = ~0; |
@@ -218,7 +218,7 @@ struct rtnl_link_ops vlan_link_ops __read_mostly = { | |||
218 | .kind = "vlan", | 218 | .kind = "vlan", |
219 | .maxtype = IFLA_VLAN_MAX, | 219 | .maxtype = IFLA_VLAN_MAX, |
220 | .policy = vlan_policy, | 220 | .policy = vlan_policy, |
221 | .priv_size = sizeof(struct vlan_dev_info), | 221 | .priv_size = sizeof(struct vlan_dev_priv), |
222 | .setup = vlan_setup, | 222 | .setup = vlan_setup, |
223 | .validate = vlan_validate, | 223 | .validate = vlan_validate, |
224 | .newlink = vlan_newlink, | 224 | .newlink = vlan_newlink, |
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index d34b6daf8930..c718fd3664b6 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
@@ -168,13 +168,13 @@ err: | |||
168 | 168 | ||
169 | int vlan_proc_add_dev(struct net_device *vlandev) | 169 | int vlan_proc_add_dev(struct net_device *vlandev) |
170 | { | 170 | { |
171 | struct vlan_dev_info *dev_info = vlan_dev_info(vlandev); | 171 | struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); |
172 | struct vlan_net *vn = net_generic(dev_net(vlandev), vlan_net_id); | 172 | struct vlan_net *vn = net_generic(dev_net(vlandev), vlan_net_id); |
173 | 173 | ||
174 | dev_info->dent = | 174 | vlan->dent = |
175 | proc_create_data(vlandev->name, S_IFREG|S_IRUSR|S_IWUSR, | 175 | proc_create_data(vlandev->name, S_IFREG|S_IRUSR|S_IWUSR, |
176 | vn->proc_vlan_dir, &vlandev_fops, vlandev); | 176 | vn->proc_vlan_dir, &vlandev_fops, vlandev); |
177 | if (!dev_info->dent) | 177 | if (!vlan->dent) |
178 | return -ENOBUFS; | 178 | return -ENOBUFS; |
179 | return 0; | 179 | return 0; |
180 | } | 180 | } |
@@ -187,10 +187,10 @@ int vlan_proc_rem_dev(struct net_device *vlandev) | |||
187 | struct vlan_net *vn = net_generic(dev_net(vlandev), vlan_net_id); | 187 | struct vlan_net *vn = net_generic(dev_net(vlandev), vlan_net_id); |
188 | 188 | ||
189 | /** NOTE: This will consume the memory pointed to by dent, it seems. */ | 189 | /** NOTE: This will consume the memory pointed to by dent, it seems. */ |
190 | if (vlan_dev_info(vlandev)->dent) { | 190 | if (vlan_dev_priv(vlandev)->dent) { |
191 | remove_proc_entry(vlan_dev_info(vlandev)->dent->name, | 191 | remove_proc_entry(vlan_dev_priv(vlandev)->dent->name, |
192 | vn->proc_vlan_dir); | 192 | vn->proc_vlan_dir); |
193 | vlan_dev_info(vlandev)->dent = NULL; | 193 | vlan_dev_priv(vlandev)->dent = NULL; |
194 | } | 194 | } |
195 | return 0; | 195 | return 0; |
196 | } | 196 | } |
@@ -268,10 +268,10 @@ static int vlan_seq_show(struct seq_file *seq, void *v) | |||
268 | nmtype ? nmtype : "UNKNOWN"); | 268 | nmtype ? nmtype : "UNKNOWN"); |
269 | } else { | 269 | } else { |
270 | const struct net_device *vlandev = v; | 270 | const struct net_device *vlandev = v; |
271 | const struct vlan_dev_info *dev_info = vlan_dev_info(vlandev); | 271 | const struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); |
272 | 272 | ||
273 | seq_printf(seq, "%-15s| %d | %s\n", vlandev->name, | 273 | seq_printf(seq, "%-15s| %d | %s\n", vlandev->name, |
274 | dev_info->vlan_id, dev_info->real_dev->name); | 274 | vlan->vlan_id, vlan->real_dev->name); |
275 | } | 275 | } |
276 | return 0; | 276 | return 0; |
277 | } | 277 | } |
@@ -279,7 +279,7 @@ static int vlan_seq_show(struct seq_file *seq, void *v) | |||
279 | static int vlandev_seq_show(struct seq_file *seq, void *offset) | 279 | static int vlandev_seq_show(struct seq_file *seq, void *offset) |
280 | { | 280 | { |
281 | struct net_device *vlandev = (struct net_device *) seq->private; | 281 | struct net_device *vlandev = (struct net_device *) seq->private; |
282 | const struct vlan_dev_info *dev_info = vlan_dev_info(vlandev); | 282 | const struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); |
283 | struct rtnl_link_stats64 temp; | 283 | struct rtnl_link_stats64 temp; |
284 | const struct rtnl_link_stats64 *stats; | 284 | const struct rtnl_link_stats64 *stats; |
285 | static const char fmt64[] = "%30s %12llu\n"; | 285 | static const char fmt64[] = "%30s %12llu\n"; |
@@ -291,8 +291,8 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset) | |||
291 | stats = dev_get_stats(vlandev, &temp); | 291 | stats = dev_get_stats(vlandev, &temp); |
292 | seq_printf(seq, | 292 | seq_printf(seq, |
293 | "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n", | 293 | "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n", |
294 | vlandev->name, dev_info->vlan_id, | 294 | vlandev->name, vlan->vlan_id, |
295 | (int)(dev_info->flags & 1), vlandev->priv_flags); | 295 | (int)(vlan->flags & 1), vlandev->priv_flags); |
296 | 296 | ||
297 | seq_printf(seq, fmt64, "total frames received", stats->rx_packets); | 297 | seq_printf(seq, fmt64, "total frames received", stats->rx_packets); |
298 | seq_printf(seq, fmt64, "total bytes received", stats->rx_bytes); | 298 | seq_printf(seq, fmt64, "total bytes received", stats->rx_bytes); |
@@ -300,23 +300,23 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset) | |||
300 | seq_puts(seq, "\n"); | 300 | seq_puts(seq, "\n"); |
301 | seq_printf(seq, fmt64, "total frames transmitted", stats->tx_packets); | 301 | seq_printf(seq, fmt64, "total frames transmitted", stats->tx_packets); |
302 | seq_printf(seq, fmt64, "total bytes transmitted", stats->tx_bytes); | 302 | seq_printf(seq, fmt64, "total bytes transmitted", stats->tx_bytes); |
303 | seq_printf(seq, "Device: %s", dev_info->real_dev->name); | 303 | seq_printf(seq, "Device: %s", vlan->real_dev->name); |
304 | /* now show all PRIORITY mappings relating to this VLAN */ | 304 | /* now show all PRIORITY mappings relating to this VLAN */ |
305 | seq_printf(seq, "\nINGRESS priority mappings: " | 305 | seq_printf(seq, "\nINGRESS priority mappings: " |
306 | "0:%u 1:%u 2:%u 3:%u 4:%u 5:%u 6:%u 7:%u\n", | 306 | "0:%u 1:%u 2:%u 3:%u 4:%u 5:%u 6:%u 7:%u\n", |
307 | dev_info->ingress_priority_map[0], | 307 | vlan->ingress_priority_map[0], |
308 | dev_info->ingress_priority_map[1], | 308 | vlan->ingress_priority_map[1], |
309 | dev_info->ingress_priority_map[2], | 309 | vlan->ingress_priority_map[2], |
310 | dev_info->ingress_priority_map[3], | 310 | vlan->ingress_priority_map[3], |
311 | dev_info->ingress_priority_map[4], | 311 | vlan->ingress_priority_map[4], |
312 | dev_info->ingress_priority_map[5], | 312 | vlan->ingress_priority_map[5], |
313 | dev_info->ingress_priority_map[6], | 313 | vlan->ingress_priority_map[6], |
314 | dev_info->ingress_priority_map[7]); | 314 | vlan->ingress_priority_map[7]); |
315 | 315 | ||
316 | seq_printf(seq, " EGRESS priority mappings: "); | 316 | seq_printf(seq, " EGRESS priority mappings: "); |
317 | for (i = 0; i < 16; i++) { | 317 | for (i = 0; i < 16; i++) { |
318 | const struct vlan_priority_tci_mapping *mp | 318 | const struct vlan_priority_tci_mapping *mp |
319 | = dev_info->egress_priority_map[i]; | 319 | = vlan->egress_priority_map[i]; |
320 | while (mp) { | 320 | while (mp) { |
321 | seq_printf(seq, "%u:%hu ", | 321 | seq_printf(seq, "%u:%hu ", |
322 | mp->priority, ((mp->vlan_qos >> 13) & 0x7)); | 322 | mp->priority, ((mp->vlan_qos >> 13) & 0x7)); |