From: Michal Kazior <michal.kazior@tieto.com>
To: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org,
Janusz Dziedzic <janusz.dziedzic@tieto.com>,
Michal Kazior <michal.kazior@tieto.com>
Subject: [PATCH 2/3] ath10k: fix idle power consumption
Date: Fri, 8 May 2015 09:13:07 +0000 [thread overview]
Message-ID: <1431076388-24800-3-git-send-email-michal.kazior@tieto.com> (raw)
In-Reply-To: <1431076388-24800-1-git-send-email-michal.kazior@tieto.com>
From: Janusz Dziedzic <janusz.dziedzic@tieto.com>
mac80211 can update vif powersave state while
disconnected. Firmware doesn't behave nicely and
consumes more power than necessary if PS is
disabled on a non-started vdev. Hence
force-enable PS for non-running vdevs.
This reduces power drain on QCA61X4 from 88mA to
36mA when interface is up and not associated.
QCA988X wasn't measured.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 425dbe271495..9f576ca99f86 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1735,7 +1735,14 @@ static int ath10k_mac_vif_setup_ps(struct ath10k_vif *arvif)
enable_ps = false;
}
- if (enable_ps) {
+ if (!arvif->is_started) {
+ /* mac80211 can update vif powersave state while disconnected.
+ * Firmware doesn't behave nicely and consumes more power than
+ * necessary if PS is disabled on a non-started vdev. Hence
+ * force-enable PS for non-running vdevs.
+ */
+ psmode = WMI_STA_PS_MODE_ENABLED;
+ } else if (enable_ps) {
psmode = WMI_STA_PS_MODE_ENABLED;
param = WMI_STA_PS_PARAM_INACTIVITY_TIME;
--
2.1.4
next prev parent reply other threads:[~2015-05-08 9:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 9:13 [PATCH 0/3] ath10k: improve power efficiency Michal Kazior
2015-05-08 9:13 ` [PATCH 1/3] ath10k: enable ASPM Michal Kazior
2015-05-08 9:13 ` Michal Kazior [this message]
2015-05-08 9:13 ` [PATCH 3/3] ath10k: enable pci soc powersaving Michal Kazior
2015-05-08 17:53 ` Peter Oh
2015-05-11 5:01 ` Michal Kazior
2015-05-18 9:38 ` [PATCH v2 0/3] ath10k: improve power efficiency Michal Kazior
2015-05-18 9:38 ` [PATCH v2 1/3] ath10k: enable ASPM Michal Kazior
2015-05-18 9:38 ` [PATCH v2 2/3] ath10k: fix idle power consumption Michal Kazior
2015-05-18 9:38 ` [PATCH v2 3/3] ath10k: enable pci soc powersaving Michal Kazior
2015-05-22 10:41 ` [PATCH v2 0/3] ath10k: improve power efficiency Kalle Valo
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=1431076388-24800-3-git-send-email-michal.kazior@tieto.com \
--to=michal.kazior@tieto.com \
--cc=ath10k@lists.infradead.org \
--cc=janusz.dziedzic@tieto.com \
--cc=linux-wireless@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).