net: dsa: bcm_sf2: add support for controlling EEE

When EEE is enabled, negotiate this feature with the PHY and make sure
that the capability checking, local EEE advertisement, link partner EEE
advertisement and auto-negotiation resolution returned by phy_init_eee()
is positive, and enable EEE at the switch level.

While querying the current EEE settings, verify the low-power indication
and indicate its status.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Florian Fainelli
2014-09-24 17:05:22 -07:00
committed by David S. Miller
parent 7905288f09
commit 450b05c15f
3 changed files with 79 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <net/dsa.h>
@@ -43,6 +44,8 @@ struct bcm_sf2_hw_params {
struct bcm_sf2_port_status {
unsigned int link;
struct ethtool_eee eee;
};
struct bcm_sf2_priv {