summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2013-06-29 19:23:13 +0200
committerDavid S. Miller <davem@davemloft.net>2013-07-01 13:18:19 -0700
commitef0cc4b1d296ce041e3b24d103177dd70642740c (patch)
tree10febd3b6de7b689b038be5e72b36599711d0a64 /drivers/net/ethernet/atheros
parent0a6eac24583848490e9a9c02daef5e33c997431f (diff)
downloadlinux-ef0cc4b1d296ce041e3b24d103177dd70642740c.tar.gz
linux-ef0cc4b1d296ce041e3b24d103177dd70642740c.tar.bz2
linux-ef0cc4b1d296ce041e3b24d103177dd70642740c.zip
alx: treat flow control correctly in alx_set_pauseparam()
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 <ben@decadent.org.uk> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r--drivers/net/ethernet/atheros/alx/ethtool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/alx/ethtool.c b/drivers/net/ethernet/atheros/alx/ethtool.c
index 6fa2aec2bc81..50a91d012bce 100644
--- a/drivers/net/ethernet/atheros/alx/ethtool.c
+++ b/drivers/net/ethernet/atheros/alx/ethtool.c
@@ -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 */