From: Vivien Didelot Date: Tue, 1 Aug 2017 20:32:33 +0000 (-0400) Subject: net: dsa: qca8k: enable EEE once X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dca20989313aba3288e3a1d3a88007ccafb37e25;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index e076ab23d4df..9d6b5d2f7a4a 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -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; }