X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=net%2F8021q%2Fvlanproc.c;h=6262c335f3c278b7a4fd171fe85cd5d23bbff2e3;hb=36cbd3dcc10384f813ec0814255f576c84f2bcd4;hp=6073a888b6f92610ce6a3c95b509e4293618976b;hpb=26a25239d7a660cc7162e2463b48b40d544364d0;p=safe%2Fjmp%2Flinux-2.6 diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index 6073a88..6262c33 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c @@ -18,16 +18,9 @@ *****************************************************************************/ #include -#include /* offsetof(), etc. */ -#include /* return codes */ +#include #include -#include /* kmalloc(), kfree() */ -#include -#include /* inline mem*, str* functions */ -#include /* __initfunc et al. */ -#include /* htons(), etc. */ -#include /* copy_to_user */ -#include +#include #include #include #include @@ -114,7 +107,7 @@ static const struct file_operations vlandev_fops = { */ /* Strings */ -static const char *vlan_name_type_str[VLAN_NAME_TYPE_HIGHEST] = { +static const char *const vlan_name_type_str[VLAN_NAME_TYPE_HIGHEST] = { [VLAN_NAME_TYPE_RAW_PLUS_VID] = "VLAN_NAME_TYPE_RAW_PLUS_VID", [VLAN_NAME_TYPE_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_PLUS_VID_NO_PAD", [VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD", @@ -286,13 +279,14 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset) { struct net_device *vlandev = (struct net_device *) seq->private; const struct vlan_dev_info *dev_info = vlan_dev_info(vlandev); - struct net_device_stats *stats = &vlandev->stats; + const struct net_device_stats *stats; static const char fmt[] = "%30s %12lu\n"; int i; if (!is_vlan_dev(vlandev)) return 0; + stats = dev_get_stats(vlandev); seq_printf(seq, "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n", vlandev->name, dev_info->vlan_id, @@ -321,7 +315,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset) dev_info->ingress_priority_map[6], dev_info->ingress_priority_map[7]); - seq_printf(seq, "EGRESSS priority Mappings: "); + seq_printf(seq, " EGRESS priority mappings: "); for (i = 0; i < 16; i++) { const struct vlan_priority_tci_mapping *mp = dev_info->egress_priority_map[i];