ixgbe: Cleanup DCB logic, whitespace, and comments in ixgbe_ethtool.c
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 17 Nov 2010 03:27:05 +0000 (19:27 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 17 Nov 2010 03:27:05 +0000 (19:27 -0800)
This change address a few whitespace issues in DCB #ifdefs, adds a comment
calling out the DCB specific registers, and nests an if statement inline
with a number of if statements related to flow control.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ixgbe/ixgbe_ethtool.c

index 0a4b322fab6a7e85f3d78547e872b8be8e2551c6..6871b2be64f6ed1fe484d8e9b81ee42cb43554b7 100644 (file)
@@ -342,13 +342,6 @@ static void ixgbe_get_pauseparam(struct net_device *netdev,
        else
                pause->autoneg = 1;
 
-#ifdef CONFIG_DCB
-       if (hw->fc.current_mode == ixgbe_fc_pfc) {
-               pause->rx_pause = 0;
-               pause->tx_pause = 0;
-       }
-
-#endif
        if (hw->fc.current_mode == ixgbe_fc_rx_pause) {
                pause->rx_pause = 1;
        } else if (hw->fc.current_mode == ixgbe_fc_tx_pause) {
@@ -356,6 +349,11 @@ static void ixgbe_get_pauseparam(struct net_device *netdev,
        } else if (hw->fc.current_mode == ixgbe_fc_full) {
                pause->rx_pause = 1;
                pause->tx_pause = 1;
+#ifdef CONFIG_DCB
+       } else if (hw->fc.current_mode == ixgbe_fc_pfc) {
+               pause->rx_pause = 0;
+               pause->tx_pause = 0;
+#endif
        }
 }
 
@@ -373,7 +371,6 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
                return -EINVAL;
 
 #endif
-
        fc = hw->fc;
 
        if (pause->autoneg != AUTONEG_ENABLE)
@@ -629,6 +626,7 @@ static void ixgbe_get_regs(struct net_device *netdev,
        regs_buff[827] = IXGBE_READ_REG(hw, IXGBE_WUPM);
        regs_buff[828] = IXGBE_READ_REG(hw, IXGBE_FHFT(0));
 
+       /* DCB */
        regs_buff[829] = IXGBE_READ_REG(hw, IXGBE_RMCS);
        regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_DPMCS);
        regs_buff[831] = IXGBE_READ_REG(hw, IXGBE_PDPMCS);