libertas: Added callback functions to support SDIO suspend/resume.
In suspend() host sleep is activated using already configured host sleep parameters through wol command, and in resume() host sleep is cancelled. Earlier priv->fw_ready flag used to reset and set in suspend and resume handler respectively. Since after suspend only host goes into sleep state and firmware is always ready, those changes in flag state are removed. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
a7da74fc88
commit
66fceb69b7
@@ -91,23 +91,22 @@ static int lbs_ethtool_set_wol(struct net_device *dev,
|
||||
struct ethtool_wolinfo *wol)
|
||||
{
|
||||
struct lbs_private *priv = dev->ml_priv;
|
||||
uint32_t criteria = 0;
|
||||
|
||||
if (wol->wolopts & ~(WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
priv->wol_criteria = 0;
|
||||
if (wol->wolopts & WAKE_UCAST)
|
||||
criteria |= EHS_WAKE_ON_UNICAST_DATA;
|
||||
priv->wol_criteria |= EHS_WAKE_ON_UNICAST_DATA;
|
||||
if (wol->wolopts & WAKE_MCAST)
|
||||
criteria |= EHS_WAKE_ON_MULTICAST_DATA;
|
||||
priv->wol_criteria |= EHS_WAKE_ON_MULTICAST_DATA;
|
||||
if (wol->wolopts & WAKE_BCAST)
|
||||
criteria |= EHS_WAKE_ON_BROADCAST_DATA;
|
||||
priv->wol_criteria |= EHS_WAKE_ON_BROADCAST_DATA;
|
||||
if (wol->wolopts & WAKE_PHY)
|
||||
criteria |= EHS_WAKE_ON_MAC_EVENT;
|
||||
priv->wol_criteria |= EHS_WAKE_ON_MAC_EVENT;
|
||||
if (wol->wolopts == 0)
|
||||
criteria |= EHS_REMOVE_WAKEUP;
|
||||
|
||||
return lbs_host_sleep_cfg(priv, criteria, (struct wol_config *)NULL);
|
||||
priv->wol_criteria |= EHS_REMOVE_WAKEUP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
const struct ethtool_ops lbs_ethtool_ops = {
|
||||
|
Reference in New Issue
Block a user