diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2013-05-26 21:31:28 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-27 23:30:09 -0700 |
commit | 9a9c56cb34e65000d1f0a4b7553399bfcf7c5a52 (patch) | |
tree | f9ccee6f2e74fc7fb1fb128ef0849a7a740f7c25 /drivers/net/phy | |
parent | a622260254ee481747cceaaa8609985b29a31565 (diff) |
net: phy: fix a bug when verify the EEE support
The phy_init_eee has to exit with an error when the
local device and its link partner both do not support EEE.
So this patch fixes a problem when verify this.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index c14f14741b3..38f0b312ff8 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1044,7 +1044,7 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable) adv = mmd_eee_adv_to_ethtool_adv_t(eee_adv); lp = mmd_eee_adv_to_ethtool_adv_t(eee_lp); idx = phy_find_setting(phydev->speed, phydev->duplex); - if ((lp & adv & settings[idx].setting)) + if (!(lp & adv & settings[idx].setting)) goto eee_exit; if (clk_stop_enable) { |