aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlanproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlanproc.c')
-rw-r--r--net/8021q/vlanproc.c42
1 files changed, 21 insertions, 21 deletions
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
169int vlan_proc_add_dev(struct net_device *vlandev) 169int 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)
279static int vlandev_seq_show(struct seq_file *seq, void *offset) 279static 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));