public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Libertas: coding style cleanup in ethtool.c
@ 2009-11-10  2:04 Bing Zhao
  2009-11-10  2:04 ` [PATCH 2/2] Libertas: fix issues while configuring host sleep using ethtool wol Bing Zhao
  2009-11-10  6:33 ` [PATCH 1/2] Libertas: coding style cleanup in ethtool.c Dan Williams
  0 siblings, 2 replies; 4+ messages in thread
From: Bing Zhao @ 2009-11-10  2:04 UTC (permalink / raw)
  To: libertas-dev; +Cc: linux-wireless, Bing Zhao, Amitkumar Karwar

Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
 drivers/net/wireless/libertas/ethtool.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
index 039b555..6efa388 100644
--- a/drivers/net/wireless/libertas/ethtool.c
+++ b/drivers/net/wireless/libertas/ethtool.c
@@ -175,10 +175,14 @@ static int lbs_ethtool_set_wol(struct net_device *dev,
 	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;
 
 	return lbs_host_sleep_cfg(priv, criteria, (struct wol_config *)NULL);
 }
-- 
1.5.3.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] Libertas: fix issues while configuring host sleep using ethtool wol
  2009-11-10  2:04 [PATCH 1/2] Libertas: coding style cleanup in ethtool.c Bing Zhao
@ 2009-11-10  2:04 ` Bing Zhao
  2009-11-10  6:33   ` Dan Williams
  2009-11-10  6:33 ` [PATCH 1/2] Libertas: coding style cleanup in ethtool.c Dan Williams
  1 sibling, 1 reply; 4+ messages in thread
From: Bing Zhao @ 2009-11-10  2:04 UTC (permalink / raw)
  To: libertas-dev; +Cc: linux-wireless, Bing Zhao, Amitkumar Karwar

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>
---
 drivers/net/wireless/libertas/ethtool.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
index 6efa388..53d56ab 100644
--- a/drivers/net/wireless/libertas/ethtool.c
+++ b/drivers/net/wireless/libertas/ethtool.c
@@ -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;
 
@@ -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);
 }
-- 
1.5.3.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] Libertas: coding style cleanup in ethtool.c
  2009-11-10  2:04 [PATCH 1/2] Libertas: coding style cleanup in ethtool.c Bing Zhao
  2009-11-10  2:04 ` [PATCH 2/2] Libertas: fix issues while configuring host sleep using ethtool wol Bing Zhao
@ 2009-11-10  6:33 ` Dan Williams
  1 sibling, 0 replies; 4+ messages in thread
From: Dan Williams @ 2009-11-10  6:33 UTC (permalink / raw)
  To: Bing Zhao; +Cc: libertas-dev, linux-wireless, Amitkumar Karwar

On Mon, 2009-11-09 at 18:04 -0800, Bing Zhao wrote:
> Signed-off-by: Bing Zhao <bzhao@marvell.com>

Acked-by: Dan Williams <dcbw@redhat.com>

> ---
>  drivers/net/wireless/libertas/ethtool.c |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
> index 039b555..6efa388 100644
> --- a/drivers/net/wireless/libertas/ethtool.c
> +++ b/drivers/net/wireless/libertas/ethtool.c
> @@ -175,10 +175,14 @@ static int lbs_ethtool_set_wol(struct net_device *dev,
>  	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;
>  
>  	return lbs_host_sleep_cfg(priv, criteria, (struct wol_config *)NULL);
>  }


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] Libertas: fix issues while configuring host sleep using ethtool wol
  2009-11-10  2:04 ` [PATCH 2/2] Libertas: fix issues while configuring host sleep using ethtool wol Bing Zhao
@ 2009-11-10  6:33   ` Dan Williams
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Williams @ 2009-11-10  6:33 UTC (permalink / raw)
  To: Bing Zhao; +Cc: libertas-dev, Amitkumar Karwar, linux-wireless

On Mon, 2009-11-09 at 18:04 -0800, Bing Zhao wrote:
> 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>

Acked-by: Dan Williams <dcbw@redhat.com>

> ---
>  drivers/net/wireless/libertas/ethtool.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
> index 6efa388..53d56ab 100644
> --- a/drivers/net/wireless/libertas/ethtool.c
> +++ b/drivers/net/wireless/libertas/ethtool.c
> @@ -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;
>  
> @@ -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);
>  }


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-10  6:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-10  2:04 [PATCH 1/2] Libertas: coding style cleanup in ethtool.c Bing Zhao
2009-11-10  2:04 ` [PATCH 2/2] Libertas: fix issues while configuring host sleep using ethtool wol Bing Zhao
2009-11-10  6:33   ` Dan Williams
2009-11-10  6:33 ` [PATCH 1/2] Libertas: coding style cleanup in ethtool.c Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox