Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184589
b: refs/heads/master
c: 9675478
h: refs/heads/master
i:
  184587: 6a11aad
v: v3
  • Loading branch information
Jeff Garzik authored and David S. Miller committed Feb 28, 2010
1 parent 180d87e commit 557a778
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 6c74651c3bce418d3b29edfdeb72664f9441509a
refs/heads/master: 9675478bbafed08848bf8d7e28400d5e46330b23
10 changes: 6 additions & 4 deletions trunk/net/core/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,23 @@ u32 ethtool_op_get_flags(struct net_device *dev)
int ethtool_op_set_flags(struct net_device *dev, u32 data)
{
const struct ethtool_ops *ops = dev->ethtool_ops;
unsigned long features = dev->features;

if (data & ETH_FLAG_LRO)
dev->features |= NETIF_F_LRO;
features |= NETIF_F_LRO;
else
dev->features &= ~NETIF_F_LRO;
features &= ~NETIF_F_LRO;

if (data & ETH_FLAG_NTUPLE) {
if (!ops->set_rx_ntuple)
return -EOPNOTSUPP;
dev->features |= NETIF_F_NTUPLE;
features |= NETIF_F_NTUPLE;
} else {
/* safe to clear regardless */
dev->features &= ~NETIF_F_NTUPLE;
features &= ~NETIF_F_NTUPLE;
}

dev->features = features;
return 0;
}

Expand Down

0 comments on commit 557a778

Please sign in to comment.