Search Linux Wireless

Re: [PATCH] Libertas: Fix issues while configuring host sleep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-11-04 at 17:06 -0800, Bing Zhao wrote:
> From: Amitkumar Karwar <akarwar@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxxx>
> Signed-off-by: Bing Zhao <bzhao@xxxxxxxxxxx>

Acked-by: Dan Williams <dcbw@xxxxxxxxxx>

> ---
>  drivers/net/wireless/libertas/ethtool.c |   16 +++++++++++-----
>  1 files changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
> index 039b555..eeda6d7 100644
> --- a/drivers/net/wireless/libertas/ethtool.c
> +++ b/drivers/net/wireless/libertas/ethtool.c
> @@ -169,16 +169,22 @@ 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)
> +	if (priv->wol_criteria != 0xffffffff && wol->wolopts)
>  		return -EOPNOTSUPP;
>  
>  	if (wol->wolopts & ~(WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY))
>  		return -EOPNOTSUPP;
>  
> -	if (wol->wolopts & WAKE_UCAST) criteria |= EHS_WAKE_ON_UNICAST_DATA;
> -	if (wol->wolopts & WAKE_MCAST) criteria |= EHS_WAKE_ON_MULTICAST_DATA;
> -	if (wol->wolopts & WAKE_BCAST) criteria |= EHS_WAKE_ON_BROADCAST_DATA;
> -	if (wol->wolopts & WAKE_PHY)   criteria |= EHS_WAKE_ON_MAC_EVENT;
> +	if (wol->wolopts & WAKE_UCAST)
> +		criteria |= EHS_WAKE_ON_UNICAST_DATA;
> +	if (wol->wolopts & WAKE_MCAST)
> +		criteria |= EHS_WAKE_ON_MULTICAST_DATA;
> +	if (wol->wolopts & WAKE_BCAST)
> +		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);
>  }

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux