]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ath9k: disable RIFS search for AR91xx based chips
authorFelix Fietkau <nbd@openwrt.org>
Wed, 24 Feb 2010 03:43:05 +0000 (04:43 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 16:06:39 +0000 (09:06 -0700)
commit 7bfbae10dc10a5c94a780d117a57e875d77e8e5a upstream.

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>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/phy.h

index ae371448b5a0cad6b093b06d64ce3da3bc5e67c7..7c64aa521a100b7f78ec76382cc2cc232180423d 100644 (file)
@@ -1345,6 +1345,16 @@ static void ath9k_hw_override_ini(struct ath_hw *ah,
         * 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,
index 31de27dc0c4a842b3841fe7355cedb5670e972f7..0999a495fd46add32fa1b9d0c95c1ec55c2e39e8 100644 (file)
@@ -384,6 +384,9 @@ bool ath9k_hw_set_rf_regs(struct ath_hw *ah,
 
 #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