Skip to content

Commit

Permalink
Libertas: fix issues while configuring host sleep using ethtool wol
Browse files Browse the repository at this point in the history
Configuration of wake-on-lan for unicast, multicast, broadcast, physical
activity was not working. Kernel panic issue was there when user tries to
disable WOL. Fixed them.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Bing Zhao authored and John W. Linville committed Nov 10, 2009
1 parent 866d470 commit c3b866a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/wireless/libertas/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,6 @@ static int lbs_ethtool_set_wol(struct net_device *dev,
struct lbs_private *priv = dev->ml_priv;
uint32_t criteria = 0;

if (priv->wol_criteria == 0xffffffff && wol->wolopts)
return -EOPNOTSUPP;

if (wol->wolopts & ~(WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY))
return -EOPNOTSUPP;

Expand All @@ -183,6 +180,8 @@ static int lbs_ethtool_set_wol(struct net_device *dev,
criteria |= EHS_WAKE_ON_BROADCAST_DATA;
if (wol->wolopts & WAKE_PHY)
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);
}
Expand Down

0 comments on commit c3b866a

Please sign in to comment.