Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203420
b: refs/heads/master
c: a204b48
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jul 9, 2010
1 parent 4b62474 commit e33de39
Show file tree
Hide file tree
Showing 2 changed files with 21 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: dd4ba83dc1becbb3bb383851381c10c372e47247
refs/heads/master: a204b48ed4dc31acf61090e530430ce3272b6aab
20 changes: 20 additions & 0 deletions trunk/net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,12 +836,32 @@ static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, st
return stats;
}

static int vlan_ethtool_set_tso(struct net_device *dev, u32 data)
{
if (data) {
struct net_device *real_dev = vlan_dev_info(dev)->real_dev;

/* Underlying device must support TSO for VLAN-tagged packets
* and must have TSO enabled now.
*/
if (!(real_dev->vlan_features & NETIF_F_TSO))
return -EOPNOTSUPP;
if (!(real_dev->features & NETIF_F_TSO))
return -EINVAL;
dev->features |= NETIF_F_TSO;
} else {
dev->features &= ~NETIF_F_TSO;
}
return 0;
}

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,
.set_tso = vlan_ethtool_set_tso,
};

static const struct net_device_ops vlan_netdev_ops = {
Expand Down

0 comments on commit e33de39

Please sign in to comment.