alx: treat flow control correctly in alx_set_pauseparam()
authorJohannes Berg <[email protected]>
Sat, 29 Jun 2013 17:23:13 +0000 (19:23 +0200)
committerDavid S. Miller <[email protected]>
Mon, 1 Jul 2013 20:18:19 +0000 (13:18 -0700)
Even when alx_setup_speed_duplex() is called, we still
need to call alx_cfg_mac_flowcontrol() and set hw->flowctrl
if flow control changed.

This was a bug I accidentally introduced while simplifying
the original driver.

Reported-by: Ben Hutchings <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/atheros/alx/ethtool.c

index 6fa2aec2bc8105ffc47d955c5c88d2dcaf5f3422..50a91d012bceaf0edccf16c73a3a2fd9d0a44b0e 100644 (file)
@@ -187,7 +187,8 @@ static int alx_set_pauseparam(struct net_device *netdev,
 
        if (reconfig_phy) {
                err = alx_setup_speed_duplex(hw, hw->adv_cfg, fc);
-               return err;
+               if (err)
+                       return err;
        }
 
        /* flow control on mac */