diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-02-06 18:18:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-07 05:43:07 -0500 |
commit | 7d8eb29e6eae9cc13e1975daf28d2ae789c1f110 (patch) | |
tree | 4b04b15107a271927cd77b304cde2f03819ae967 /drivers/net/igb/igb_ethtool.c | |
parent | 0fbe67af3ee1928f7eae273133b7112d1665d4d3 (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/net/igb/igb_ethtool.c')
-rw-r--r-- | drivers/net/igb/igb_ethtool.c | 16 |
1 files changed, 7 insertions, 9 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 | ||
288 | static u32 igb_get_tx_csum(struct net_device *netdev) | 288 | static 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 | ||
293 | static int igb_set_tx_csum(struct net_device *netdev, u32 data) | 293 | static 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"); |