All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath9k: disable RIFS search for AR91xx based chips
@ 2010-02-24  3:43 Felix Fietkau
  2010-02-24  4:48 ` Luis R. Rodriguez
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2010-02-24  3:43 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luis R. Rodriguez, John W. Linville

While ath9k does not support RIFS yet, the ability to receive RIFS
frames is currently enabled for most chipsets in the initvals.
This is causing baseband related issues on AR9160 and AR9130 based
chipsets, which can lock up under certain conditions.

This patch fixes these issues by overriding the initvals, effectively
disabling RIFS for all affected chipsets.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
---
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1326,6 +1326,16 @@ static void ath9k_hw_override_ini(struct
 	 * Necessary to avoid issues on AR5416 2.0
 	 */
 	REG_WRITE(ah, 0x9800 + (651 << 2), 0x11);
+
+	/*
+	 * Disable RIFS search on some chips to avoid baseband
+	 * hang issues.
+	 */
+	if (AR_SREV_9100(ah) || AR_SREV_9160(ah)) {
+		val = REG_READ(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS);
+		val &= ~AR_PHY_RIFS_INIT_DELAY;
+		REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val);
+	}
 }
 
 static u32 ath9k_hw_def_ini_fixup(struct ath_hw *ah,
--- a/drivers/net/wireless/ath/ath9k/phy.h
+++ b/drivers/net/wireless/ath/ath9k/phy.h
@@ -384,6 +384,9 @@ bool ath9k_hw_set_rf_regs(struct ath_hw 
 
 #define AR_PHY_HEAVY_CLIP_ENABLE         0x99E0
 
+#define AR_PHY_HEAVY_CLIP_FACTOR_RIFS    0x99EC
+#define AR_PHY_RIFS_INIT_DELAY         0x03ff0000
+
 #define AR_PHY_M_SLEEP      0x99f0
 #define AR_PHY_REFCLKDLY    0x99f4
 #define AR_PHY_REFCLKPD     0x99f8

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

* Re: [PATCH] ath9k: disable RIFS search for AR91xx based chips
  2010-02-24  3:43 [PATCH] ath9k: disable RIFS search for AR91xx based chips Felix Fietkau
@ 2010-02-24  4:48 ` Luis R. Rodriguez
  0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2010-02-24  4:48 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, John W. Linville

On Tue, Feb 23, 2010 at 7:43 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> While ath9k does not support RIFS yet,

Not 100% sure but I actually think we do have it enabled for
single-chip solutions and I think it should work.

> the ability to receive RIFS
> frames is currently enabled for most chipsets in the initvals.
> This is causing baseband related issues on AR9160 and AR9130 based
> chipsets, which can lock up under certain conditions.
>
> This patch fixes these issues by overriding the initvals, effectively
> disabling RIFS for all affected chipsets.
>
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> Cc: stable@kernel.org

Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>

  Luis

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

end of thread, other threads:[~2010-02-24  4:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-24  3:43 [PATCH] ath9k: disable RIFS search for AR91xx based chips Felix Fietkau
2010-02-24  4:48 ` Luis R. Rodriguez

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.