diff options
Diffstat (limited to 'drivers/net/sfc/ethtool.c')
-rw-r--r-- | drivers/net/sfc/ethtool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index ccd82f12456c..6142c3a394bf 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -447,7 +447,7 @@ static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable) | |||
447 | /* No way to stop the hardware doing the checks; we just | 447 | /* No way to stop the hardware doing the checks; we just |
448 | * ignore the result. | 448 | * ignore the result. |
449 | */ | 449 | */ |
450 | efx->rx_checksum_enabled = (enable ? 1 : 0); | 450 | efx->rx_checksum_enabled = !!enable; |
451 | 451 | ||
452 | return 0; | 452 | return 0; |
453 | } | 453 | } |
@@ -641,9 +641,9 @@ static void efx_ethtool_get_pauseparam(struct net_device *net_dev, | |||
641 | { | 641 | { |
642 | struct efx_nic *efx = netdev_priv(net_dev); | 642 | struct efx_nic *efx = netdev_priv(net_dev); |
643 | 643 | ||
644 | pause->rx_pause = (efx->flow_control & EFX_FC_RX) ? 1 : 0; | 644 | pause->rx_pause = !!(efx->flow_control & EFX_FC_RX); |
645 | pause->tx_pause = (efx->flow_control & EFX_FC_TX) ? 1 : 0; | 645 | pause->tx_pause = !!(efx->flow_control & EFX_FC_TX); |
646 | pause->autoneg = (efx->flow_control & EFX_FC_AUTO) ? 1 : 0; | 646 | pause->autoneg = !!(efx->flow_control & EFX_FC_AUTO); |
647 | } | 647 | } |
648 | 648 | ||
649 | 649 | ||