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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index b1367ce6586e..b8551a57dd3f 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -275,13 +275,17 @@ static int igb_set_pauseparam(struct net_device *netdev,
275static u32 igb_get_rx_csum(struct net_device *netdev) 275static u32 igb_get_rx_csum(struct net_device *netdev)
276{ 276{
277 struct igb_adapter *adapter = netdev_priv(netdev); 277 struct igb_adapter *adapter = netdev_priv(netdev);
278 return adapter->rx_csum; 278 return !(adapter->flags & IGB_FLAG_RX_CSUM_DISABLED);
279} 279}
280 280
281static int igb_set_rx_csum(struct net_device *netdev, u32 data) 281static int igb_set_rx_csum(struct net_device *netdev, u32 data)
282{ 282{
283 struct igb_adapter *adapter = netdev_priv(netdev); 283 struct igb_adapter *adapter = netdev_priv(netdev);
284 adapter->rx_csum = data; 284
285 if (data)
286 adapter->flags &= ~IGB_FLAG_RX_CSUM_DISABLED;
287 else
288 adapter->flags |= IGB_FLAG_RX_CSUM_DISABLED;
285 289
286 return 0; 290 return 0;
287} 291}