Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b2c57eee66592e22327bf39b42c4e3dc24708213
Commit:     b2c57eee66592e22327bf39b42c4e3dc24708213
Parent:     b47ef2438dea2ddad4561152aa8007a2d95e8157
Author:     David Woodhouse <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 17 14:41:13 2007 -0500
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:07:42 2008 -0800

    libertas: allow for PS mode to be disabled when firmware doesn't support it
    
    Otherwise, we go into an endless busy loop trying to enable PS mode when
    the command queue is empty, dealing with the error response, and then
    trying to enable PS mode again because the command queue is empty.... it
    doesn't really save much power.
    
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/libertas/dev.h  |    1 +
 drivers/net/wireless/libertas/host.h |    5 +++++
 drivers/net/wireless/libertas/wext.c |    7 +++++++
 3 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/libertas/dev.h 
b/drivers/net/wireless/libertas/dev.h
index fe50457..1c6ec4d 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -260,6 +260,7 @@ struct lbs_private {
        u16 psmode;             /* Wlan802_11PowermodeCAM=disable
                                   Wlan802_11PowermodeMAX_PSP=enable */
        u32 psstate;
+       char ps_supported;
        u8 needtowakeup;
 
        struct PS_CMD_ConfirmSleep lbs_ps_confirm_sleep;
diff --git a/drivers/net/wireless/libertas/host.h 
b/drivers/net/wireless/libertas/host.h
index 4c03e12..1aa0407 100644
--- a/drivers/net/wireless/libertas/host.h
+++ b/drivers/net/wireless/libertas/host.h
@@ -209,6 +209,11 @@
 #define        CMD_TYPE_MAX_PSP                0x0001
 #define CMD_TYPE_FAST_PSP              0x0002
 
+/* Options for CMD_802_11_FW_WAKE_METHOD */
+#define CMD_WAKE_METHOD_UNCHANGED      0x0000
+#define CMD_WAKE_METHOD_COMMAND_INT    0x0001
+#define CMD_WAKE_METHOD_GPIO           0x0002
+
 /* Define action or option for CMD_BT_ACCESS */
 enum cmd_bt_access_opts {
        /* The bt commands start at 5 instead of 1 because the old dft commands
diff --git a/drivers/net/wireless/libertas/wext.c 
b/drivers/net/wireless/libertas/wext.c
index b1e2472..3e8d555 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -734,6 +734,13 @@ static int lbs_set_power(struct net_device *dev, struct 
iw_request_info *info,
 
        lbs_deb_enter(LBS_DEB_WEXT);
 
+       if (!priv->ps_supported) {
+               if (vwrq->disabled)
+                       return 0;
+               else
+                       return -EINVAL;
+       }
+
        /* PS is currently supported only in Infrastructure mode
         * Remove this check if it is to be supported in IBSS mode also
         */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to