Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159198
b: refs/heads/master
c: 1896e61
h: refs/heads/master
v: v3
  • Loading branch information
Sridhar Samudrala authored and David S. Miller committed Jul 27, 2009
1 parent 38bfc7a commit 7f2e31d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: 7d073c68a49b23b5ba2bc23c3bb5b3bcaa0b4f20
refs/heads/master: 1896e61ff7cc1c9dd0d8b1cf4a9426a0f7217a20
13 changes: 11 additions & 2 deletions trunk/net/core/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ u32 ethtool_op_get_link(struct net_device *dev)
return netif_carrier_ok(dev) ? 1 : 0;
}

u32 ethtool_op_get_rx_csum(struct net_device *dev)
{
return (dev->features & NETIF_F_ALL_CSUM) != 0;
}

u32 ethtool_op_get_tx_csum(struct net_device *dev)
{
return (dev->features & NETIF_F_ALL_CSUM) != 0;
Expand Down Expand Up @@ -1004,7 +1009,9 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
break;
case ETHTOOL_GRXCSUM:
rc = ethtool_get_value(dev, useraddr, ethcmd,
dev->ethtool_ops->get_rx_csum);
(dev->ethtool_ops->get_rx_csum ?
dev->ethtool_ops->get_rx_csum :
ethtool_op_get_rx_csum));
break;
case ETHTOOL_SRXCSUM:
rc = ethtool_set_rx_csum(dev, useraddr);
Expand Down Expand Up @@ -1068,7 +1075,9 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
break;
case ETHTOOL_GFLAGS:
rc = ethtool_get_value(dev, useraddr, ethcmd,
dev->ethtool_ops->get_flags);
(dev->ethtool_ops->get_flags ?
dev->ethtool_ops->get_flags :
ethtool_op_get_flags));
break;
case ETHTOOL_SFLAGS:
rc = ethtool_set_value(dev, useraddr,
Expand Down

0 comments on commit 7f2e31d

Please sign in to comment.