linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] ath9k_hw: use cold instead of warm reset on AR9280
@ 2012-03-03 14:17 Felix Fietkau
  2012-03-03 14:17 ` [PATCH 2/5] ath9k: make MAC sample statistics optional Felix Fietkau
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Felix Fietkau @ 2012-03-03 14:17 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, mcgrof

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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-03-05 15:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-03 14:17 [PATCH 1/5] ath9k_hw: use cold instead of warm reset on AR9280 Felix Fietkau
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

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).