aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-02-06 18:18:27 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-07 05:43:07 -0500
commit7d8eb29e6eae9cc13e1975daf28d2ae789c1f110 (patch)
tree4b04b15107a271927cd77b304cde2f03819ae967 /drivers
parent0fbe67af3ee1928f7eae273133b7112d1665d4d3 (diff)
igb: update feature flags supported in ethtool
This driver is currently using HW_CSUM which is not correct. Update this to use the IP_CSUM and IPV6_CSUM flags. In addition consolidate the TSO flag setting. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/igb/igb_ethtool.c16
-rw-r--r--drivers/net/igb/igb_main.c5
2 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index 84be46c2a0f9..d7bdc6c16d0e 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");
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index e3a3582fec90..8c27e0a23dff 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1158,11 +1158,12 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1158 "PHY reset is blocked due to SOL/IDER session.\n"); 1158 "PHY reset is blocked due to SOL/IDER session.\n");
1159 1159
1160 netdev->features = NETIF_F_SG | 1160 netdev->features = NETIF_F_SG |
1161 NETIF_F_HW_CSUM | 1161 NETIF_F_IP_CSUM |
1162 NETIF_F_HW_VLAN_TX | 1162 NETIF_F_HW_VLAN_TX |
1163 NETIF_F_HW_VLAN_RX | 1163 NETIF_F_HW_VLAN_RX |
1164 NETIF_F_HW_VLAN_FILTER; 1164 NETIF_F_HW_VLAN_FILTER;
1165 1165
1166 netdev->features |= NETIF_F_IPV6_CSUM;
1166 netdev->features |= NETIF_F_TSO; 1167 netdev->features |= NETIF_F_TSO;
1167 netdev->features |= NETIF_F_TSO6; 1168 netdev->features |= NETIF_F_TSO6;
1168 1169
@@ -1172,7 +1173,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1172 1173
1173 netdev->vlan_features |= NETIF_F_TSO; 1174 netdev->vlan_features |= NETIF_F_TSO;
1174 netdev->vlan_features |= NETIF_F_TSO6; 1175 netdev->vlan_features |= NETIF_F_TSO6;
1175 netdev->vlan_features |= NETIF_F_HW_CSUM; 1176 netdev->vlan_features |= NETIF_F_IP_CSUM;
1176 netdev->vlan_features |= NETIF_F_SG; 1177 netdev->vlan_features |= NETIF_F_SG;
1177 1178
1178 if (pci_using_dac) 1179 if (pci_using_dac)