mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
06d7b5c3ac
commit
dca2098931
1 changed files with 3 additions and 2 deletions
|
@ -684,12 +684,13 @@ qca8k_set_eee(struct dsa_switch *ds, int port,
|
|||
|
||||
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);
|
||||
if (!p->eee_enabled)
|
||||
ret = -EOPNOTSUPP;
|
||||
}
|
||||
qca8k_eee_enable_set(ds, port, p->eee_enabled);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue