[PATCH] Fix ethtool reporting no WOL options supported if WOL is not already active
Dan Williams
dcbw at redhat.com
Wed May 26 01:26:44 EDT 2010
On Sun, 2010-05-23 at 10:03 +0200, Sascha Silbe wrote:
> This patch fixes the libertas driver incorrectly reporting that Wake-on-LAN
> is not supported if Wake-on-LAN is currently disabled.
Looks good to me; could you repost to linux-wireless at vger so I can ack
it and Linville will pick it up?
Dan
> ---
> drivers/net/wireless/libertas/ethtool.c | 9 +++------
> 1 files changed, 3 insertions(+), 6 deletions(-)
>
> Without patch:
>
> root at xo15-minimal:~# ethtool wlan0
> Settings for wlan0:
> Supports Wake-on: d
> Wake-on: d
> root at xo15-minimal:~# ethtool -s wlan0 wol pum
> root at xo15-minimal:~# ethtool wlan0
> Settings for wlan0:
> Supports Wake-on: pumb
> Wake-on: pum
> root at xo15-minimal:~# ethtool -s wlan0 wol d
> root at xo15-minimal:~# ethtool wlan0
> Settings for wlan0:
> Supports Wake-on: d
> Wake-on: d
> root at xo15-minimal:~#
>
>
> With patch:
>
> xo-sascha:~# ethtool eth0
> Settings for eth0:
> Supports Wake-on: pumb
> Wake-on: d
> xo-sascha:~# ethtool -s eth0 wol pum
> xo-sascha:~# ethtool eth0
> Settings for eth0:
> Supports Wake-on: pumb
> Wake-on: pum
> xo-sascha:~# ethtool -s eth0 wol d
> xo-sascha:~# ethtool eth0
> Settings for eth0:
> Supports Wake-on: pumb
> Wake-on: d
>
> diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
> index 6eb9a88..4a337b7 100644
> --- a/drivers/net/wireless/libertas/ethtool.c
> +++ b/drivers/net/wireless/libertas/ethtool.c
> @@ -145,14 +145,11 @@ static void lbs_ethtool_get_wol(struct net_device *dev,
> {
> struct lbs_private *priv = dev->ml_priv;
>
> - if (priv->wol_criteria == 0xffffffff) {
> - /* Interface driver didn't configure wake */
> - wol->supported = wol->wolopts = 0;
> - return;
> - }
> -
> wol->supported = WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY;
>
> + if (priv->wol_criteria == EHS_REMOVE_WAKEUP)
> + return;
> +
> if (priv->wol_criteria & EHS_WAKE_ON_UNICAST_DATA)
> wol->wolopts |= WAKE_UCAST;
> if (priv->wol_criteria & EHS_WAKE_ON_MULTICAST_DATA)
More information about the libertas-dev
mailing list