aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-12 20:06:06 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:07:05 -0500
commit506e9025e030c441679fb1ae77fb0d6266c34443 (patch)
tree9869587068fae691b9bdee93c6b9df85ef786023 /drivers/net/wireless/libertas/cmd.c
parentd1f7a5b8cfefdb443a05a9e3d636fe7fef57459a (diff)
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 <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r--drivers/net/wireless/libertas/cmd.c14
1 files changed, 8 insertions, 6 deletions
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:
111 return ret; 111 return ret;
112} 112}
113 113
114int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria, 114int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria)
115 uint8_t gpio, uint8_t gap)
116{ 115{
117 struct cmd_ds_host_sleep cmd_config; 116 struct cmd_ds_host_sleep cmd_config;
118 int ret; 117 int ret;
119 118
120 cmd_config.criteria = cpu_to_le32(criteria); 119 cmd_config.criteria = cpu_to_le32(criteria);
121 cmd_config.gpio = gpio; 120 cmd_config.gpio = priv->wol_gpio;
122 cmd_config.gap = gap; 121 cmd_config.gap = priv->wol_gap;
123 122
124 ret = lbs_cmd_with_response(priv, CMD_802_11_HOST_SLEEP_CFG, &cmd_config); 123 ret = lbs_cmd_with_response(priv, CMD_802_11_HOST_SLEEP_CFG, &cmd_config);
125 if (ret) { 124 if (!ret) {
125 lbs_deb_cmd("Set WOL criteria to %x\n", criteria);
126 priv->wol_criteria = criteria;
127 } else {
126 lbs_pr_info("HOST_SLEEP_CFG failed %d\n", ret); 128 lbs_pr_info("HOST_SLEEP_CFG failed %d\n", ret);
127 return ret;
128 } 129 }
130
129 return ret; 131 return ret;
130} 132}
131EXPORT_SYMBOL_GPL(lbs_host_sleep_cfg); 133EXPORT_SYMBOL_GPL(lbs_host_sleep_cfg);