diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/8021q/vlan.c | 8 | ||||
-rw-r--r-- | net/8021q/vlan.h | 6 | ||||
-rw-r--r-- | net/8021q/vlan_dev.c | 22 |
3 files changed, 30 insertions, 6 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) */ |
47 | static struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE]; | 47 | static struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE]; |
48 | 48 | ||
49 | static char vlan_fullname[] = "802.1Q VLAN Support"; | 49 | const char vlan_fullname[] = "802.1Q VLAN Support"; |
50 | static char vlan_version[] = DRV_VERSION; | 50 | const char vlan_version[] = DRV_VERSION; |
51 | static char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>"; | 51 | static const char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>"; |
52 | static char vlan_buggyright[] = "David S. Miller <davem@redhat.com>"; | 52 | static const char vlan_buggyright[] = "David S. Miller <davem@redhat.com>"; |
53 | 53 | ||
54 | static struct packet_type vlan_packet_type = { | 54 | static 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; } | |||
108 | static inline void vlan_gvrp_uninit(void) {} | 108 | static inline void vlan_gvrp_uninit(void) {} |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | int vlan_netlink_init(void); | 111 | extern const char vlan_fullname[]; |
112 | void vlan_netlink_fini(void); | 112 | extern const char vlan_version[]; |
113 | extern int vlan_netlink_init(void); | ||
114 | extern void vlan_netlink_fini(void); | ||
113 | 115 | ||
114 | extern struct rtnl_link_ops vlan_link_ops; | 116 | extern struct rtnl_link_ops vlan_link_ops; |
115 | 117 | ||
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 8883e9c8a223..c269fcbd13d5 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -648,6 +648,26 @@ static void vlan_dev_uninit(struct net_device *dev) | |||
648 | } | 648 | } |
649 | } | 649 | } |
650 | 650 | ||
651 | static int vlan_ethtool_get_settings(struct net_device *dev, | ||
652 | struct ethtool_cmd *cmd) | ||
653 | { | ||
654 | const struct vlan_dev_info *vlan = vlan_dev_info(dev); | ||
655 | struct net_device *real_dev = vlan->real_dev; | ||
656 | |||
657 | if (!real_dev->ethtool_ops->get_settings) | ||
658 | return -EOPNOTSUPP; | ||
659 | |||
660 | return real_dev->ethtool_ops->get_settings(real_dev, cmd); | ||
661 | } | ||
662 | |||
663 | static void vlan_ethtool_get_drvinfo(struct net_device *dev, | ||
664 | struct ethtool_drvinfo *info) | ||
665 | { | ||
666 | strcpy(info->driver, vlan_fullname); | ||
667 | strcpy(info->version, vlan_version); | ||
668 | strcpy(info->fw_version, "N/A"); | ||
669 | } | ||
670 | |||
651 | static u32 vlan_ethtool_get_rx_csum(struct net_device *dev) | 671 | static u32 vlan_ethtool_get_rx_csum(struct net_device *dev) |
652 | { | 672 | { |
653 | const struct vlan_dev_info *vlan = vlan_dev_info(dev); | 673 | const struct vlan_dev_info *vlan = vlan_dev_info(dev); |
@@ -672,6 +692,8 @@ static u32 vlan_ethtool_get_flags(struct net_device *dev) | |||
672 | } | 692 | } |
673 | 693 | ||
674 | static const struct ethtool_ops vlan_ethtool_ops = { | 694 | static const struct ethtool_ops vlan_ethtool_ops = { |
695 | .get_settings = vlan_ethtool_get_settings, | ||
696 | .get_drvinfo = vlan_ethtool_get_drvinfo, | ||
675 | .get_link = ethtool_op_get_link, | 697 | .get_link = ethtool_op_get_link, |
676 | .get_rx_csum = vlan_ethtool_get_rx_csum, | 698 | .get_rx_csum = vlan_ethtool_get_rx_csum, |
677 | .get_flags = vlan_ethtool_get_flags, | 699 | .get_flags = vlan_ethtool_get_flags, |