Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless...
[linux-2.6-block.git] / drivers / net / ethernet / emulex / benet / be_ethtool.c
index 73a500ccbf69592d0de09b0cc17f4db82e925664..4d2de47007692a85e1477da07b98402b489bc312 100644 (file)
@@ -193,8 +193,6 @@ static const struct be_ethtool_stat et_tx_stats[] = {
        {DRVSTAT_TX_INFO(tx_pkts)},
        /* Number of skbs queued for trasmission by the driver */
        {DRVSTAT_TX_INFO(tx_reqs)},
-       /* Number of TX work request blocks DMAed to HW */
-       {DRVSTAT_TX_INFO(tx_wrbs)},
        /* Number of times the TX queue was stopped due to lack
         * of spaces in the TXQ.
         */
@@ -707,15 +705,17 @@ be_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd)
 
        if (ecmd->autoneg != adapter->phy.fc_autoneg)
                return -EINVAL;
-       adapter->tx_fc = ecmd->tx_pause;
-       adapter->rx_fc = ecmd->rx_pause;
 
-       status = be_cmd_set_flow_control(adapter,
-                                        adapter->tx_fc, adapter->rx_fc);
-       if (status)
+       status = be_cmd_set_flow_control(adapter, ecmd->tx_pause,
+                                        ecmd->rx_pause);
+       if (status) {
                dev_warn(&adapter->pdev->dev, "Pause param set failed\n");
+               return be_cmd_status(status);
+       }
 
-       return be_cmd_status(status);
+       adapter->tx_fc = ecmd->tx_pause;
+       adapter->rx_fc = ecmd->rx_pause;
+       return 0;
 }
 
 static int be_set_phys_id(struct net_device *netdev,