net: dsa: bcm_sf2: add support for Wake-on-LAN

In order for Wake-on-LAN to work properly, we query the parent network
device Wake-on-LAN features and advertise those. Similarly, when
configuring Wake-on-LAN on a per-port network interface, we make sure
that we do not accept something the master network devices does not
support.

Finally, we need to maintain a bitmask of the ports enabled for
Wake-on-LAN to prevent the suspend() callback from disabling a port that
is used for waking up the system.

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-18 17:31:25 -07:00
committed by David S. Miller
parent 19e57c4e6d
commit 96e65d7f3f
2 changed files with 61 additions and 0 deletions

View File

@@ -70,6 +70,9 @@ struct bcm_sf2_priv {
struct bcm_sf2_hw_params hw_params;
struct bcm_sf2_port_status port_sts[DSA_MAX_PORTS];
/* Mask of ports enabled for Wake-on-LAN */
u32 wol_ports_mask;
};
struct bcm_sf2_hw_stats {