igb: update feature flags supported in ethtool
[deliverable/linux.git] / drivers / net / igb / igb_ethtool.c
index 84be46c2a0f93c2e50d7e1bc972bdf0d2a7e4cbc..d7bdc6c16d0ea0a3efd410826f5f41334d38392b 100644 (file)
@@ -287,15 +287,15 @@ static int igb_set_rx_csum(struct net_device *netdev, u32 data)
 
 static u32 igb_get_tx_csum(struct net_device *netdev)
 {
-       return (netdev->features & NETIF_F_HW_CSUM) != 0;
+       return (netdev->features & NETIF_F_IP_CSUM) != 0;
 }
 
 static int igb_set_tx_csum(struct net_device *netdev, u32 data)
 {
        if (data)
-               netdev->features |= NETIF_F_HW_CSUM;
+               netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
        else
-               netdev->features &= ~NETIF_F_HW_CSUM;
+               netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
 
        return 0;
 }
@@ -304,15 +304,13 @@ static int igb_set_tso(struct net_device *netdev, u32 data)
 {
        struct igb_adapter *adapter = netdev_priv(netdev);
 
-       if (data)
+       if (data) {
                netdev->features |= NETIF_F_TSO;
-       else
-               netdev->features &= ~NETIF_F_TSO;
-
-       if (data)
                netdev->features |= NETIF_F_TSO6;
-       else
+       } else {
+               netdev->features &= ~NETIF_F_TSO;
                netdev->features &= ~NETIF_F_TSO6;
+       }
 
        dev_info(&adapter->pdev->dev, "TSO is %s\n",
                 data ? "Enabled" : "Disabled");
This page took 0.028401 seconds and 5 git commands to generate.