diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-10-27 11:52:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-28 04:20:30 -0400 |
commit | 85ad76b2f9c4956ec90c86298b22bb35c326e772 (patch) | |
tree | a8ed31c11c1ba8da38ad8a357b29410e737be975 /drivers/net/igb/igb_ethtool.c | |
parent | 04a5fcaaf0e12d066411aa54e42591952aa18da7 (diff) |
igb: add a flags value to the ring
This patch adds a flags value to the ring that cleans up some of the last
remaining items from the ring in order to help seperate it from the adapter
struct. By implementing these flags it becomes possible for different rings
to support different functions such as rx checksumming.
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 | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index f62430b1f759..c44dedec1265 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c | |||
@@ -279,17 +279,20 @@ static int igb_set_pauseparam(struct net_device *netdev, | |||
279 | static u32 igb_get_rx_csum(struct net_device *netdev) | 279 | static u32 igb_get_rx_csum(struct net_device *netdev) |
280 | { | 280 | { |
281 | struct igb_adapter *adapter = netdev_priv(netdev); | 281 | struct igb_adapter *adapter = netdev_priv(netdev); |
282 | return !(adapter->flags & IGB_FLAG_RX_CSUM_DISABLED); | 282 | return !!(adapter->rx_ring[0].flags & IGB_RING_FLAG_RX_CSUM); |
283 | } | 283 | } |
284 | 284 | ||
285 | static int igb_set_rx_csum(struct net_device *netdev, u32 data) | 285 | static int igb_set_rx_csum(struct net_device *netdev, u32 data) |
286 | { | 286 | { |
287 | struct igb_adapter *adapter = netdev_priv(netdev); | 287 | struct igb_adapter *adapter = netdev_priv(netdev); |
288 | int i; | ||
288 | 289 | ||
289 | if (data) | 290 | for (i = 0; i < adapter->num_rx_queues; i++) { |
290 | adapter->flags &= ~IGB_FLAG_RX_CSUM_DISABLED; | 291 | if (data) |
291 | else | 292 | adapter->rx_ring[i].flags |= IGB_RING_FLAG_RX_CSUM; |
292 | adapter->flags |= IGB_FLAG_RX_CSUM_DISABLED; | 293 | else |
294 | adapter->rx_ring[i].flags &= ~IGB_RING_FLAG_RX_CSUM; | ||
295 | } | ||
293 | 296 | ||
294 | return 0; | 297 | return 0; |
295 | } | 298 | } |