diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index b447dd7de347..a119cbd8dbb8 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -167,7 +167,7 @@ static void ixgbe_get_pauseparam(struct net_device *netdev, | |||
167 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 167 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
168 | struct ixgbe_hw *hw = &adapter->hw; | 168 | struct ixgbe_hw *hw = &adapter->hw; |
169 | 169 | ||
170 | pause->autoneg = AUTONEG_DISABLE; | 170 | pause->autoneg = (hw->fc.type == ixgbe_fc_full ? 1 : 0); |
171 | 171 | ||
172 | if (hw->fc.type == ixgbe_fc_rx_pause) { | 172 | if (hw->fc.type == ixgbe_fc_rx_pause) { |
173 | pause->rx_pause = 1; | 173 | pause->rx_pause = 1; |
@@ -185,10 +185,8 @@ static int ixgbe_set_pauseparam(struct net_device *netdev, | |||
185 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 185 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
186 | struct ixgbe_hw *hw = &adapter->hw; | 186 | struct ixgbe_hw *hw = &adapter->hw; |
187 | 187 | ||
188 | if (pause->autoneg == AUTONEG_ENABLE) | 188 | if ((pause->autoneg == AUTONEG_ENABLE) || |
189 | return -EINVAL; | 189 | (pause->rx_pause && pause->tx_pause)) |
190 | |||
191 | if (pause->rx_pause && pause->tx_pause) | ||
192 | hw->fc.type = ixgbe_fc_full; | 190 | hw->fc.type = ixgbe_fc_full; |
193 | else if (pause->rx_pause && !pause->tx_pause) | 191 | else if (pause->rx_pause && !pause->tx_pause) |
194 | hw->fc.type = ixgbe_fc_rx_pause; | 192 | hw->fc.type = ixgbe_fc_rx_pause; |
@@ -196,6 +194,8 @@ static int ixgbe_set_pauseparam(struct net_device *netdev, | |||
196 | hw->fc.type = ixgbe_fc_tx_pause; | 194 | hw->fc.type = ixgbe_fc_tx_pause; |
197 | else if (!pause->rx_pause && !pause->tx_pause) | 195 | else if (!pause->rx_pause && !pause->tx_pause) |
198 | hw->fc.type = ixgbe_fc_none; | 196 | hw->fc.type = ixgbe_fc_none; |
197 | else | ||
198 | return -EINVAL; | ||
199 | 199 | ||
200 | hw->fc.original_type = hw->fc.type; | 200 | hw->fc.original_type = hw->fc.type; |
201 | 201 | ||