Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121517
b: refs/heads/master
c: b302006
h: refs/heads/master
i:
  121515: 9e23ce5
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Oct 29, 2008
1 parent 0882dfa commit 52c1c32
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3717746ef8b5a9279281b5d318496710984ed739
refs/heads/master: b30200616f97a81243e6d0c644d8ab06bf0b8115
8 changes: 4 additions & 4 deletions trunk/net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ int vlan_net_id;
/* Our listing of VLAN group(s) */
static struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE];

static char vlan_fullname[] = "802.1Q VLAN Support";
static char vlan_version[] = DRV_VERSION;
static char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>";
static char vlan_buggyright[] = "David S. Miller <davem@redhat.com>";
const char vlan_fullname[] = "802.1Q VLAN Support";
const char vlan_version[] = DRV_VERSION;
static const char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>";
static const char vlan_buggyright[] = "David S. Miller <davem@redhat.com>";

static struct packet_type vlan_packet_type = {
.type = __constant_htons(ETH_P_8021Q),
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/8021q/vlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ static inline int vlan_gvrp_init(void) { return 0; }
static inline void vlan_gvrp_uninit(void) {}
#endif

int vlan_netlink_init(void);
void vlan_netlink_fini(void);
extern const char vlan_fullname[];
extern const char vlan_version[];
extern int vlan_netlink_init(void);
extern void vlan_netlink_fini(void);

extern struct rtnl_link_ops vlan_link_ops;

Expand Down
22 changes: 22 additions & 0 deletions trunk/net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,26 @@ static void vlan_dev_uninit(struct net_device *dev)
}
}

static int vlan_ethtool_get_settings(struct net_device *dev,
struct ethtool_cmd *cmd)
{
const struct vlan_dev_info *vlan = vlan_dev_info(dev);
struct net_device *real_dev = vlan->real_dev;

if (!real_dev->ethtool_ops->get_settings)
return -EOPNOTSUPP;

return real_dev->ethtool_ops->get_settings(real_dev, cmd);
}

static void vlan_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
strcpy(info->driver, vlan_fullname);
strcpy(info->version, vlan_version);
strcpy(info->fw_version, "N/A");
}

static u32 vlan_ethtool_get_rx_csum(struct net_device *dev)
{
const struct vlan_dev_info *vlan = vlan_dev_info(dev);
Expand All @@ -672,6 +692,8 @@ static u32 vlan_ethtool_get_flags(struct net_device *dev)
}

static const struct ethtool_ops vlan_ethtool_ops = {
.get_settings = vlan_ethtool_get_settings,
.get_drvinfo = vlan_ethtool_get_drvinfo,
.get_link = ethtool_op_get_link,
.get_rx_csum = vlan_ethtool_get_rx_csum,
.get_flags = vlan_ethtool_get_flags,
Expand Down

0 comments on commit 52c1c32

Please sign in to comment.