From: "Chen, Chien-Chia" <machen@suse.com>
To: users@rt2x00.serialmonkey.com
Cc: linux-wireless@vger.kernel.org
Subject: [rt2x00-users] [PATCH] rt2800lib : Add a patch to disable/enable power save mode.
Date: Mon, 17 Dec 2012 17:43:13 +0800 [thread overview]
Message-ID: <1355737393-8143-1-git-send-email-machen@suse.com> (raw)
This patch is to enable/disable power save mode. rt2800lib
disables PCI WLAN module power save mode default. It allows
to enable the power save mode.
Sign-off-by: Chen, Chien-Chia <matt680209@gmail.com>
---
drivers/net/wireless/rt2x00/rt2800lib.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 197b446..8ddbf83 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -44,6 +44,13 @@
#include "rt2800.h"
/*
+ * Allow power save mode to be disabled.
+ */
+static bool power_save_disabled = true;
+module_param(power_save_disabled, bool, 0444);
+MODULE_PARM_DESC(power_save_disabled, " Disable power save. (default: disable. 1=disable, 0=enable.)");
+
+/*
* Register access.
* All access to the CSR registers will go through the methods
* rt2800_register_read and rt2800_register_write.
@@ -5079,7 +5086,8 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
/*
* Disable powersaving as default on PCI devices.
*/
- if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev))
+ if ((rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) &&
+ power_save_disabled)
rt2x00dev->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
/*
--
1.6.0.2
next reply other threads:[~2012-12-17 9:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 9:43 Chen, Chien-Chia [this message]
2012-12-17 9:41 ` [rt2x00-users] [PATCH] rt2800lib : Add a patch to disable/enable power save mode Ivo Van Doorn
[not found] ` <CALx5=V8SgDV+R8YGNgP3=_qNMJgf9AC82fA1vr9yCyW8n8T4NA@mail.gmail.com>
2012-12-17 10:01 ` Ivo Van Doorn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355737393-8143-1-git-send-email-machen@suse.com \
--to=machen@suse.com \
--cc=linux-wireless@vger.kernel.org \
--cc=users@rt2x00.serialmonkey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.