Commit dca20989 authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller

net: dsa: qca8k: enable EEE once

If EEE is queried enabled, qca8k_set_eee calls qca8k_eee_enable_set
twice (because it is already called in qca8k_eee_init). Fix that.
Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 06d7b5c3
...@@ -684,12 +684,13 @@ qca8k_set_eee(struct dsa_switch *ds, int port, ...@@ -684,12 +684,13 @@ qca8k_set_eee(struct dsa_switch *ds, int port,
p->eee_enabled = e->eee_enabled; p->eee_enabled = e->eee_enabled;
if (e->eee_enabled) { if (!p->eee_enabled) {
qca8k_eee_enable_set(ds, port, false);
} else {
p->eee_enabled = qca8k_eee_init(ds, port, phydev); p->eee_enabled = qca8k_eee_init(ds, port, phydev);
if (!p->eee_enabled) if (!p->eee_enabled)
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
} }
qca8k_eee_enable_set(ds, port, p->eee_enabled);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment