summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/if_usb.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@laptop.org>2010-10-31 16:40:33 +0300
committerJohn W. Linville <linville@tuxdriver.com>2010-11-17 00:37:02 +0300
commitae63a33ec9b598b3454cf0d29077fa17b616c42a (patch)
tree031b761e7a86c4fea1b9da81a9f01a1404d965ff /drivers/net/wireless/libertas/if_usb.c
parentcf43298864fdfd687202db8c736473522bfceb98 (diff)
downloadlinux-ae63a33ec9b598b3454cf0d29077fa17b616c42a.tar.xz
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/if_usb.c')
-rw-r--r--drivers/net/wireless/libertas/if_usb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index 35931cf4d6db..6524c70363d9 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -345,6 +345,13 @@ static int if_usb_probe(struct usb_interface *intf,
if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_boot2))
lbs_pr_err("cannot register lbs_flash_boot2 attribute\n");
+ /*
+ * EHS_REMOVE_WAKEUP is not supported on all versions of the firmware.
+ */
+ priv->wol_criteria = EHS_REMOVE_WAKEUP;
+ if (lbs_host_sleep_cfg(priv, priv->wol_criteria, NULL))
+ priv->ehs_remove_supported = false;
+
return 0;
err_start_card: