diff options
author | Deepak Saxena <dsaxena@laptop.org> | 2010-10-31 09:40:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-16 16:37:02 -0500 |
commit | ae63a33ec9b598b3454cf0d29077fa17b616c42a (patch) | |
tree | 031b761e7a86c4fea1b9da81a9f01a1404d965ff /drivers/net/wireless/libertas/cmd.c | |
parent | cf43298864fdfd687202db8c736473522bfceb98 (diff) |
libertas: EHS_REMOVE_WAKEUP is not always supported
Certain firmware versions, particularly the 8388 found on the XO-1,
do not support the EHS_REMOVE_WAKEUP command that is used to disable
WOL. Sending this command to the card will return a failure that
would get propagated up the stack and cause suspend to fail.
Instead, fall back to an all-zero wakeup mask.
This fixes http://dev.laptop.org/ticket/9967
Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Signed-off-by: Daniel Drake <dsd@laptop.org>
[includes fixups by Paul Fox]
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.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 70745928f3f8..78c4da150a74 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -177,6 +177,14 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria, | |||
177 | struct cmd_ds_host_sleep cmd_config; | 177 | struct cmd_ds_host_sleep cmd_config; |
178 | int ret; | 178 | int ret; |
179 | 179 | ||
180 | /* | ||
181 | * Certain firmware versions do not support EHS_REMOVE_WAKEUP command | ||
182 | * and the card will return a failure. Since we need to be | ||
183 | * able to reset the mask, in those cases we set a 0 mask instead. | ||
184 | */ | ||
185 | if (criteria == EHS_REMOVE_WAKEUP && !priv->ehs_remove_supported) | ||
186 | criteria = 0; | ||
187 | |||
180 | cmd_config.hdr.size = cpu_to_le16(sizeof(cmd_config)); | 188 | cmd_config.hdr.size = cpu_to_le16(sizeof(cmd_config)); |
181 | cmd_config.criteria = cpu_to_le32(criteria); | 189 | cmd_config.criteria = cpu_to_le32(criteria); |
182 | cmd_config.gpio = priv->wol_gpio; | 190 | cmd_config.gpio = priv->wol_gpio; |