diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-07-21 15:29:25 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-21 16:04:31 -0700 |
commit | c3ae64ae0c08b3ff7fe0dea4d43c586f02a3adb5 (patch) | |
tree | 3d8b57b3300b92f85f58c0886ac44f5b8f90ee94 | |
parent | c51de7f3976b649d72d3ff006954640aec2fe58c (diff) | |
download | op-kernel-dev-c3ae64ae0c08b3ff7fe0dea4d43c586f02a3adb5.zip op-kernel-dev-c3ae64ae0c08b3ff7fe0dea4d43c586f02a3adb5.tar.gz |
net: bcmgenet: handle GENET_POWER_WOL_MAGIC
Update bcmgenet_power_{up,down} to handle the case where the adapter has
been suspend respectively resumed from Wake-on-LAN using MagicPackets.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 344a889..f5118f4 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -743,6 +743,10 @@ static void bcmgenet_power_down(struct bcmgenet_priv *priv, phy_detach(priv->phydev); break; + case GENET_POWER_WOL_MAGIC: + bcmgenet_wol_power_down_cfg(priv, mode); + break; + case GENET_POWER_PASSIVE: /* Power down LED */ bcmgenet_mii_reset(priv->dev); @@ -777,6 +781,9 @@ static void bcmgenet_power_up(struct bcmgenet_priv *priv, /* enable APD */ reg |= EXT_PWR_DN_EN_LD; break; + case GENET_POWER_WOL_MAGIC: + bcmgenet_wol_power_up_cfg(priv, mode); + return; default: break; } |