diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 19:46:46 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 19:46:46 -0800 |
commit | d1138cf035ad5a8dc0796b213bd078a2fb92eb7c (patch) | |
tree | 72a4640fe87720ebfc118f2b3c7f140f5d19d6b7 /drivers/net/spider_net_ethtool.c | |
parent | 15578eeb6cd4b74492f26e60624aa1a9a52ddd7b (diff) | |
parent | 77783a78ded96a56e3a1a0c03bbe87c56896fe6e (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'drivers/net/spider_net_ethtool.c')
-rw-r--r-- | drivers/net/spider_net_ethtool.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/spider_net_ethtool.c b/drivers/net/spider_net_ethtool.c index d42e60ba74c..a5bb0b7633a 100644 --- a/drivers/net/spider_net_ethtool.c +++ b/drivers/net/spider_net_ethtool.c @@ -113,6 +113,23 @@ spider_net_ethtool_set_rx_csum(struct net_device *netdev, u32 n) return 0; } +static uint32_t +spider_net_ethtool_get_tx_csum(struct net_device *netdev) +{ + return (netdev->features & NETIF_F_HW_CSUM) != 0; +} + +static int +spider_net_ethtool_set_tx_csum(struct net_device *netdev, uint32_t data) +{ + if (data) + netdev->features |= NETIF_F_HW_CSUM; + else + netdev->features &= ~NETIF_F_HW_CSUM; + + return 0; +} + struct ethtool_ops spider_net_ethtool_ops = { .get_settings = spider_net_ethtool_get_settings, .get_drvinfo = spider_net_ethtool_get_drvinfo, @@ -122,5 +139,7 @@ struct ethtool_ops spider_net_ethtool_ops = { .nway_reset = spider_net_ethtool_nway_reset, .get_rx_csum = spider_net_ethtool_get_rx_csum, .set_rx_csum = spider_net_ethtool_set_rx_csum, + .get_tx_csum = spider_net_ethtool_get_tx_csum, + .set_tx_csum = spider_net_ethtool_set_tx_csum, }; |