Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	"Luis R. Rodriguez" <lrodriguez@atheros.com>,
	Aeolus Yang <aeolus.yang@atheros.com>,
	Madhan Jaganathan <madhan.jaganathan@atheros.com>
Subject: [PATCH 4/5] ath9k_hw: dynamically choose the SERDES array for low power
Date: Mon, 21 Jun 2010 18:38:50 -0400	[thread overview]
Message-ID: <1277159931-7797-5-git-send-email-lrodriguez@atheros.com> (raw)
In-Reply-To: <1277159931-7797-1-git-send-email-lrodriguez@atheros.com>

The array we use will vary depending on whether or not we are
to go to lower power or not. The default values (iniPcieSerdes)
are a copy or what go into the registers through the INI files.

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_hw.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
index 99bde5f..0641689 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -305,11 +305,15 @@ static void ar9003_hw_configpcipowersave(struct ath_hw *ah,
 	 */
 	if (ah->config.pcieSerDesWrite) {
 		unsigned int i;
+		struct ar5416IniArray *array;
 
-		for (i = 0; i < ah->iniPcieSerdesLowPower.ia_rows; i++) {
+		array = power_off ? &ah->iniPcieSerdes :
+				    &ah->iniPcieSerdesLowPower;
+
+		for (i = 0; i < array->ia_rows; i++) {
 			REG_WRITE(ah,
-				  INI_RA(&ah->iniPcieSerdesLowPower, i, 0),
-				  INI_RA(&ah->iniPcieSerdesLowPower, i, 1));
+				  INI_RA(array, i, 0),
+				  INI_RA(array, i, 1));
 		}
 	}
 }
-- 
1.6.3.3


  parent reply	other threads:[~2010-06-21 22:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21 22:38 [PATCH 0/5] ath9K_hw: few ASPM fixes for AR9003 Luis R. Rodriguez
2010-06-21 22:38 ` [PATCH 1/5] ath9k_hw: fix ASPM setting " Luis R. Rodriguez
2010-06-21 22:38 ` [PATCH 2/5] ath9k_hw: move LowPower array writes to ar9003_hw_configpcipowersave() Luis R. Rodriguez
2010-06-21 22:38 ` [PATCH 3/5] ath9k_hw: add pcieSerDesWrite to disable SERDES ASPM tweaks Luis R. Rodriguez
2010-06-21 22:38 ` Luis R. Rodriguez [this message]
2010-06-21 22:38 ` [PATCH 5/5] ath9k_hw: add an extra delay when reseting AR_RTC_RESET Luis R. Rodriguez

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=1277159931-7797-5-git-send-email-lrodriguez@atheros.com \
    --to=lrodriguez@atheros.com \
    --cc=aeolus.yang@atheros.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=madhan.jaganathan@atheros.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox