aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb/igb_ethtool.c')
-rw-r--r--drivers/net/igb/igb_ethtool.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index 84be46c2a0f..d7bdc6c16d0 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -287,15 +287,15 @@ static int igb_set_rx_csum(struct net_device *netdev, u32 data)
287 287
288static u32 igb_get_tx_csum(struct net_device *netdev) 288static u32 igb_get_tx_csum(struct net_device *netdev)
289{ 289{
290 return (netdev->features & NETIF_F_HW_CSUM) != 0; 290 return (netdev->features & NETIF_F_IP_CSUM) != 0;
291} 291}
292 292
293static int igb_set_tx_csum(struct net_device *netdev, u32 data) 293static int igb_set_tx_csum(struct net_device *netdev, u32 data)
294{ 294{
295 if (data) 295 if (data)
296 netdev->features |= NETIF_F_HW_CSUM; 296 netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
297 else 297 else
298 netdev->features &= ~NETIF_F_HW_CSUM; 298 netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
299 299
300 return 0; 300 return 0;
301} 301}
@@ -304,15 +304,13 @@ static int igb_set_tso(struct net_device *netdev, u32 data)
304{ 304{
305 struct igb_adapter *adapter = netdev_priv(netdev); 305 struct igb_adapter *adapter = netdev_priv(netdev);
306 306
307 if (data) 307 if (data) {
308 netdev->features |= NETIF_F_TSO; 308 netdev->features |= NETIF_F_TSO;
309 else
310 netdev->features &= ~NETIF_F_TSO;
311
312 if (data)
313 netdev->features |= NETIF_F_TSO6; 309 netdev->features |= NETIF_F_TSO6;
314 else 310 } else {
311 netdev->features &= ~NETIF_F_TSO;
315 netdev->features &= ~NETIF_F_TSO6; 312 netdev->features &= ~NETIF_F_TSO6;
313 }
316 314
317 dev_info(&adapter->pdev->dev, "TSO is %s\n", 315 dev_info(&adapter->pdev->dev, "TSO is %s\n",
318 data ? "Enabled" : "Disabled"); 316 data ? "Enabled" : "Disabled");