Skip to content

Commit

Permalink
vlan: ethtool ->get_flags support
Browse files Browse the repository at this point in the history
Allow to query LRO settings of underlying device when VLAN RX
acceleration is used.

Suggested by Ben Hutchings <bhutchings@solarflare.com>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jul 15, 2008
1 parent 393e52e commit 19b9a4e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,22 @@ static u32 vlan_ethtool_get_rx_csum(struct net_device *dev)
return real_dev->ethtool_ops->get_rx_csum(real_dev);
}

static u32 vlan_ethtool_get_flags(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->features & NETIF_F_HW_VLAN_RX) ||
real_dev->ethtool_ops == NULL ||
real_dev->ethtool_ops->get_flags == NULL)
return 0;
return real_dev->ethtool_ops->get_flags(real_dev);
}

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

void vlan_setup(struct net_device *dev)
Expand Down

0 comments on commit 19b9a4e

Please sign in to comment.