From 506e9025e030c441679fb1ae77fb0d6266c34443 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 12 Dec 2007 20:06:06 -0500 Subject: libertas: add ethtool support for wake-on-lan configuration Also, check that suspend is refused if HOST_SLEEP_CFG hasn't been done. Signed-off-by: David Woodhouse Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/cmd.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'drivers/net/wireless/libertas/cmd.c') diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index f87cecb4c579..ddf15271244f 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c @@ -111,21 +111,23 @@ out: return ret; } -int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria, - uint8_t gpio, uint8_t gap) +int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria) { struct cmd_ds_host_sleep cmd_config; int ret; cmd_config.criteria = cpu_to_le32(criteria); - cmd_config.gpio = gpio; - cmd_config.gap = gap; + cmd_config.gpio = priv->wol_gpio; + cmd_config.gap = priv->wol_gap; ret = lbs_cmd_with_response(priv, CMD_802_11_HOST_SLEEP_CFG, &cmd_config); - if (ret) { + if (!ret) { + lbs_deb_cmd("Set WOL criteria to %x\n", criteria); + priv->wol_criteria = criteria; + } else { lbs_pr_info("HOST_SLEEP_CFG failed %d\n", ret); - return ret; } + return ret; } EXPORT_SYMBOL_GPL(lbs_host_sleep_cfg); -- cgit v1.2.3