net: dsa: bcm_sf2: add support for Wake-on-LAN
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 19 Sep 2014 00:31:25 +0000 (17:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Sep 2014 18:41:23 +0000 (14:41 -0400)
commit96e65d7f3f88d6e117ff80f3003d13c65e85cb03
treed1103c98dd7273538de10bea5c0e259816e8c409
parent19e57c4e6dc6b82a3204b801f4c5f27c7d007559
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>
drivers/net/dsa/bcm_sf2.c
drivers/net/dsa/bcm_sf2.h