diff options
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan.c | 2 | ||||
-rw-r--r-- | net/8021q/vlan_dev.c | 8 | ||||
-rw-r--r-- | net/8021q/vlanproc.c | 5 |
3 files changed, 5 insertions, 10 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index af2525569424..54f234696411 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -366,8 +366,6 @@ void vlan_setup(struct net_device *new_dev) | |||
366 | * the global list. | 366 | * the global list. |
367 | * iflink is set as well. | 367 | * iflink is set as well. |
368 | */ | 368 | */ |
369 | new_dev->get_stats = vlan_dev_get_stats; | ||
370 | |||
371 | /* Make this thing known as a VLAN device */ | 369 | /* Make this thing known as a VLAN device */ |
372 | new_dev->priv_flags |= IFF_802_1Q_VLAN; | 370 | new_dev->priv_flags |= IFF_802_1Q_VLAN; |
373 | 371 | ||
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 4f99bb86af5c..9543e9182796 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -174,7 +174,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, | |||
174 | skb->dev->last_rx = jiffies; | 174 | skb->dev->last_rx = jiffies; |
175 | 175 | ||
176 | /* Bump the rx counters for the VLAN device. */ | 176 | /* Bump the rx counters for the VLAN device. */ |
177 | stats = vlan_dev_get_stats(skb->dev); | 177 | stats = &skb->dev->stats; |
178 | stats->rx_packets++; | 178 | stats->rx_packets++; |
179 | stats->rx_bytes += skb->len; | 179 | stats->rx_bytes += skb->len; |
180 | 180 | ||
@@ -422,7 +422,7 @@ int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, | |||
422 | skb = skb_realloc_headroom(sk_tmp, dev->hard_header_len); | 422 | skb = skb_realloc_headroom(sk_tmp, dev->hard_header_len); |
423 | kfree_skb(sk_tmp); | 423 | kfree_skb(sk_tmp); |
424 | if (skb == NULL) { | 424 | if (skb == NULL) { |
425 | struct net_device_stats *stats = vlan_dev_get_stats(vdev); | 425 | struct net_device_stats *stats = &vdev->stats; |
426 | stats->tx_dropped++; | 426 | stats->tx_dropped++; |
427 | return -ENOMEM; | 427 | return -ENOMEM; |
428 | } | 428 | } |
@@ -453,7 +453,7 @@ int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, | |||
453 | 453 | ||
454 | int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | 454 | int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) |
455 | { | 455 | { |
456 | struct net_device_stats *stats = vlan_dev_get_stats(dev); | 456 | struct net_device_stats *stats = &dev->stats; |
457 | struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data); | 457 | struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data); |
458 | 458 | ||
459 | /* Handle non-VLAN frames if they are sent to us, for example by DHCP. | 459 | /* Handle non-VLAN frames if they are sent to us, for example by DHCP. |
@@ -514,7 +514,7 @@ int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
514 | 514 | ||
515 | int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | 515 | int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) |
516 | { | 516 | { |
517 | struct net_device_stats *stats = vlan_dev_get_stats(dev); | 517 | struct net_device_stats *stats = &dev->stats; |
518 | unsigned short veth_TCI; | 518 | unsigned short veth_TCI; |
519 | 519 | ||
520 | /* Construct the second two bytes. This field looks something | 520 | /* Construct the second two bytes. This field looks something |
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index 6cefdf8e381a..1972d5cc34e4 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
@@ -316,7 +316,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset) | |||
316 | { | 316 | { |
317 | struct net_device *vlandev = (struct net_device *) seq->private; | 317 | struct net_device *vlandev = (struct net_device *) seq->private; |
318 | const struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev); | 318 | const struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev); |
319 | struct net_device_stats *stats; | 319 | struct net_device_stats *stats = &vlandev->stats; |
320 | static const char fmt[] = "%30s %12lu\n"; | 320 | static const char fmt[] = "%30s %12lu\n"; |
321 | int i; | 321 | int i; |
322 | 322 | ||
@@ -327,9 +327,6 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset) | |||
327 | vlandev->name, dev_info->vlan_id, | 327 | vlandev->name, dev_info->vlan_id, |
328 | (int)(dev_info->flags & 1), vlandev->priv_flags); | 328 | (int)(dev_info->flags & 1), vlandev->priv_flags); |
329 | 329 | ||
330 | |||
331 | stats = vlan_dev_get_stats(vlandev); | ||
332 | |||
333 | seq_printf(seq, fmt, "total frames received", stats->rx_packets); | 330 | seq_printf(seq, fmt, "total frames received", stats->rx_packets); |
334 | seq_printf(seq, fmt, "total bytes received", stats->rx_bytes); | 331 | seq_printf(seq, fmt, "total bytes received", stats->rx_bytes); |
335 | seq_printf(seq, fmt, "Broadcast/Multicast Rcvd", stats->multicast); | 332 | seq_printf(seq, fmt, "Broadcast/Multicast Rcvd", stats->multicast); |