diff options
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 d42e60ba74ce..a5bb0b7633af 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) | |||
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | static uint32_t | ||
117 | spider_net_ethtool_get_tx_csum(struct net_device *netdev) | ||
118 | { | ||
119 | return (netdev->features & NETIF_F_HW_CSUM) != 0; | ||
120 | } | ||
121 | |||
122 | static int | ||
123 | spider_net_ethtool_set_tx_csum(struct net_device *netdev, uint32_t data) | ||
124 | { | ||
125 | if (data) | ||
126 | netdev->features |= NETIF_F_HW_CSUM; | ||
127 | else | ||
128 | netdev->features &= ~NETIF_F_HW_CSUM; | ||
129 | |||
130 | return 0; | ||
131 | } | ||
132 | |||
116 | struct ethtool_ops spider_net_ethtool_ops = { | 133 | struct ethtool_ops spider_net_ethtool_ops = { |
117 | .get_settings = spider_net_ethtool_get_settings, | 134 | .get_settings = spider_net_ethtool_get_settings, |
118 | .get_drvinfo = spider_net_ethtool_get_drvinfo, | 135 | .get_drvinfo = spider_net_ethtool_get_drvinfo, |
@@ -122,5 +139,7 @@ struct ethtool_ops spider_net_ethtool_ops = { | |||
122 | .nway_reset = spider_net_ethtool_nway_reset, | 139 | .nway_reset = spider_net_ethtool_nway_reset, |
123 | .get_rx_csum = spider_net_ethtool_get_rx_csum, | 140 | .get_rx_csum = spider_net_ethtool_get_rx_csum, |
124 | .set_rx_csum = spider_net_ethtool_set_rx_csum, | 141 | .set_rx_csum = spider_net_ethtool_set_rx_csum, |
142 | .get_tx_csum = spider_net_ethtool_get_tx_csum, | ||
143 | .set_tx_csum = spider_net_ethtool_set_tx_csum, | ||
125 | }; | 144 | }; |
126 | 145 | ||