aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan.c8
-rw-r--r--net/8021q/vlan.h6
-rw-r--r--net/8021q/vlan_core.c2
-rw-r--r--net/8021q/vlan_dev.c24
4 files changed, 30 insertions, 10 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index f0e335aa20df..72326b9c759c 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -46,10 +46,10 @@ int vlan_net_id;
46/* Our listing of VLAN group(s) */ 46/* Our listing of VLAN group(s) */
47static struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE]; 47static struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE];
48 48
49static char vlan_fullname[] = "802.1Q VLAN Support"; 49const char vlan_fullname[] = "802.1Q VLAN Support";
50static char vlan_version[] = DRV_VERSION; 50const char vlan_version[] = DRV_VERSION;
51static char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>"; 51static const char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>";
52static char vlan_buggyright[] = "David S. Miller <davem@redhat.com>"; 52static const char vlan_buggyright[] = "David S. Miller <davem@redhat.com>";
53 53
54static struct packet_type vlan_packet_type = { 54static struct packet_type vlan_packet_type = {
55 .type = __constant_htons(ETH_P_8021Q), 55 .type = __constant_htons(ETH_P_8021Q),
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h
index a6603a4d917f..82570bc2a180 100644
--- a/net/8021q/vlan.h
+++ b/net/8021q/vlan.h
@@ -108,8 +108,10 @@ static inline int vlan_gvrp_init(void) { return 0; }
108static inline void vlan_gvrp_uninit(void) {} 108static inline void vlan_gvrp_uninit(void) {}
109#endif 109#endif
110 110
111int vlan_netlink_init(void); 111extern const char vlan_fullname[];
112void vlan_netlink_fini(void); 112extern const char vlan_version[];
113extern int vlan_netlink_init(void);
114extern void vlan_netlink_fini(void);
113 115
114extern struct rtnl_link_ops vlan_link_ops; 116extern struct rtnl_link_ops vlan_link_ops;
115 117
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 68ced4bf158c..dd86a1dc4cd0 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -47,8 +47,6 @@ int vlan_hwaccel_do_receive(struct sk_buff *skb)
47 skb->priority = vlan_get_ingress_priority(dev, skb->vlan_tci); 47 skb->priority = vlan_get_ingress_priority(dev, skb->vlan_tci);
48 skb->vlan_tci = 0; 48 skb->vlan_tci = 0;
49 49
50 dev->last_rx = jiffies;
51
52 stats = &dev->stats; 50 stats = &dev->stats;
53 stats->rx_packets++; 51 stats->rx_packets++;
54 stats->rx_bytes += skb->len; 52 stats->rx_bytes += skb->len;
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 8883e9c8a223..e4bf39f87032 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -163,8 +163,6 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
163 goto err_unlock; 163 goto err_unlock;
164 } 164 }
165 165
166 skb->dev->last_rx = jiffies;
167
168 stats = &skb->dev->stats; 166 stats = &skb->dev->stats;
169 stats->rx_packets++; 167 stats->rx_packets++;
170 stats->rx_bytes += skb->len; 168 stats->rx_bytes += skb->len;
@@ -648,6 +646,26 @@ static void vlan_dev_uninit(struct net_device *dev)
648 } 646 }
649} 647}
650 648
649static int vlan_ethtool_get_settings(struct net_device *dev,
650 struct ethtool_cmd *cmd)
651{
652 const struct vlan_dev_info *vlan = vlan_dev_info(dev);
653 struct net_device *real_dev = vlan->real_dev;
654
655 if (!real_dev->ethtool_ops->get_settings)
656 return -EOPNOTSUPP;
657
658 return real_dev->ethtool_ops->get_settings(real_dev, cmd);
659}
660
661static void vlan_ethtool_get_drvinfo(struct net_device *dev,
662 struct ethtool_drvinfo *info)
663{
664 strcpy(info->driver, vlan_fullname);
665 strcpy(info->version, vlan_version);
666 strcpy(info->fw_version, "N/A");
667}
668
651static u32 vlan_ethtool_get_rx_csum(struct net_device *dev) 669static u32 vlan_ethtool_get_rx_csum(struct net_device *dev)
652{ 670{
653 const struct vlan_dev_info *vlan = vlan_dev_info(dev); 671 const struct vlan_dev_info *vlan = vlan_dev_info(dev);
@@ -672,6 +690,8 @@ static u32 vlan_ethtool_get_flags(struct net_device *dev)
672} 690}
673 691
674static const struct ethtool_ops vlan_ethtool_ops = { 692static const struct ethtool_ops vlan_ethtool_ops = {
693 .get_settings = vlan_ethtool_get_settings,
694 .get_drvinfo = vlan_ethtool_get_drvinfo,
675 .get_link = ethtool_op_get_link, 695 .get_link = ethtool_op_get_link,
676 .get_rx_csum = vlan_ethtool_get_rx_csum, 696 .get_rx_csum = vlan_ethtool_get_rx_csum,
677 .get_flags = vlan_ethtool_get_flags, 697 .get_flags = vlan_ethtool_get_flags,