Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103337
b: refs/heads/master
c: 75b8846
h: refs/heads/master
i:
  103335: 8810c41
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jul 8, 2008
1 parent 48d9d46 commit c3cbc75
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26a25239d7a660cc7162e2463b48b40d544364d0
refs/heads/master: 75b8846acd11ad3fc736d4df3413fe946bbf367c
18 changes: 18 additions & 0 deletions trunk/net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <net/datalink.h>
#include <net/p8022.h>
#include <net/arp.h>
Expand Down Expand Up @@ -716,6 +717,22 @@ static void vlan_dev_uninit(struct net_device *dev)
}
}

static u32 vlan_ethtool_get_rx_csum(struct net_device *dev)
{
const struct vlan_dev_info *vlan = vlan_dev_info(dev);
struct net_device *real_dev = vlan->real_dev;

if (real_dev->ethtool_ops == NULL ||
real_dev->ethtool_ops->get_rx_csum == NULL)
return 0;
return real_dev->ethtool_ops->get_rx_csum(real_dev);
}

static const struct ethtool_ops vlan_ethtool_ops = {
.get_link = ethtool_op_get_link,
.get_rx_csum = vlan_ethtool_get_rx_csum,
};

void vlan_setup(struct net_device *dev)
{
ether_setup(dev);
Expand All @@ -734,6 +751,7 @@ void vlan_setup(struct net_device *dev)
dev->change_rx_flags = vlan_dev_change_rx_flags;
dev->do_ioctl = vlan_dev_ioctl;
dev->destructor = free_netdev;
dev->ethtool_ops = &vlan_ethtool_ops;

memset(dev->broadcast, 0, ETH_ALEN);
}

0 comments on commit c3cbc75

Please sign in to comment.