• Vivien Didelot's avatar
    net: dsa: qca8k: fix EEE init · 06d7b5c3
    Vivien Didelot authored
    The qca8k obviously copied code from the sf2 driver as how to set EEE:
        if (e->eee_enabled) {
            p->eee_enabled = qca8k_eee_init(ds, port, phydev);
            if (!p->eee_enabled)
                ret = -EOPNOTSUPP;
    But it did not use the same logic for the EEE init routine, which is
    "Returns 0 if EEE was not enabled, or 1 otherwise". This results in
    returning -EOPNOTSUPP on success and caching EEE enabled on failure.
    This patch fixes the returned value of qca8k_eee_init.
    Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>