Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184111
b: refs/heads/master
c: 0d643e1
h: refs/heads/master
i:
  184109: 6fe838b
  184107: 246e31b
  184103: 5a5eb95
  184095: 54d49fa
v: v3
  • Loading branch information
Peter Waskiewicz authored and David S. Miller committed Feb 16, 2010
1 parent fcf26d4 commit ed75904
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: e858911804f5ecadb41afd61582a11f68d416328
refs/heads/master: 0d643e1fb4207711d9c148b5c6a2820550a4a154
13 changes: 8 additions & 5 deletions trunk/net/core/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,21 @@ 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;

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

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

return 0;
}
Expand Down Expand Up @@ -318,9 +324,6 @@ static int ethtool_set_rx_ntuple(struct net_device *dev, void __user *useraddr)
struct ethtool_rx_ntuple_flow_spec_container *fsc = NULL;
int ret;

if (!ops->set_rx_ntuple)
return -EOPNOTSUPP;

if (!(dev->features & NETIF_F_NTUPLE))
return -EINVAL;

Expand Down

0 comments on commit ed75904

Please sign in to comment.