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>
This commit is contained in:
Florian Fainelli 2014-07-21 15:29:25 -07:00 committed by David S. Miller
parent c51de7f397
commit c3ae64ae0c

View File

@ -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;
}