diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2018-11-27 22:30:14 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-03 15:13:25 -0800 |
commit | d1420bb9951592c6de4148de7441bfa93ce4eed5 (patch) | |
tree | a96567a03060800fe8a5dca87abe1c5ff0e42a46 /tools/perf/scripts/python | |
parent | 79dfab43a976b76713c40222987c48e32510ebc1 (diff) |
net: phy: improve generic EEE ethtool functions
So far the two functions consider neither member eee_enabled nor
eee_active. Therefore network drivers have to do this in some kind
of glue code. I think this can be avoided.
Getting EEE parameters:
When not advertising any EEE mode, we can't consider EEE to be enabled.
Therefore interpret "EEE enabled" as "we advertise at least one EEE
mode". It's similar with "EEE active": interpret it as "EEE modes
advertised by both link partner have at least one mode in common".
Setting EEE parameters:
If eee_enabled isn't set, don't advertise any EEE mode and restart
aneg if needed to switch off EEE. If eee_enabled is set and
data->advertised is empty (e.g. because EEE was disabled), advertise
everything we support as default. This way EEE can easily switched
on/off by doing ethtool --set-eee <if> eee on/off, w/o any additional
parameters.
The changes to both functions shouldn't break any existing user.
Once the changes have been applied, at least some users can be
simplified.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions