linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, mcgrof@qca.qualcomm.com
Subject: [PATCH 1/5] ath9k_hw: use cold instead of warm reset on AR9280
Date: Sat,  3 Mar 2012 15:17:02 +0100	[thread overview]
Message-ID: <1330784226-65563-1-git-send-email-nbd@openwrt.org> (raw)

Cold reset is more reliable for getting the hardware out of some specific
stuck states.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 drivers/net/wireless/ath/ath9k/hw.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 8c840ca..d582cf7 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1386,10 +1386,16 @@ static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type)
 static bool ath9k_hw_chip_reset(struct ath_hw *ah,
 				struct ath9k_channel *chan)
 {
-	if (AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL)) {
-		if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON))
-			return false;
-	} else if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_WARM))
+	int reset_type = ATH9K_RESET_WARM;
+
+	if (AR_SREV_9280(ah)) {
+		if (ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
+			reset_type = ATH9K_RESET_POWER_ON;
+		else
+			reset_type = ATH9K_RESET_COLD;
+	}
+
+	if (!ath9k_hw_set_reset_reg(ah, reset_type))
 		return false;
 
 	if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
-- 
1.7.3.2


             reply	other threads:[~2012-03-03 14:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-03 14:17 Felix Fietkau [this message]
2012-03-03 14:17 ` [PATCH 2/5] ath9k: make MAC sample statistics optional Felix Fietkau
2012-03-03 14:17   ` [PATCH 3/5] ath9k: remove rssi/antenna information from recv debug stats Felix Fietkau
2012-03-03 14:17     ` [PATCH 4/5] ath9k: get rid of double queueing of rx frames on EDMA Felix Fietkau
2012-03-03 14:17       ` [PATCH 5/5] ath9k: fix signal strength reporting issues Felix Fietkau
2012-03-05 13:51       ` [PATCH 4/5] ath9k: get rid of double queueing of rx frames on EDMA Mohammed Shafi
2012-03-03 14:46     ` [PATCH 3/5] ath9k: remove rssi/antenna information from recv debug stats Mohammed Shafi
2012-03-03 14:55       ` Felix Fietkau
2012-03-03 15:28         ` Mohammed Shafi
2012-03-03 14:40 ` [PATCH 1/5] ath9k_hw: use cold instead of warm reset on AR9280 Mohammed Shafi
2012-03-03 14:57   ` Felix Fietkau
2012-03-03 15:03     ` Mohammed Shafi
2012-03-05  4:03 ` Sujith Manoharan
2012-03-05 15:36   ` Felix Fietkau

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=1330784226-65563-1-git-send-email-nbd@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@qca.qualcomm.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;
as well as URLs for NNTP newsgroup(s).