ath9k: further reduce false baseband hang detects on older chips
authorFelix Fietkau <nbd@openwrt.org>
Sun, 9 Mar 2014 08:53:39 +0000 (08:53 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 9 Mar 2014 08:53:39 +0000 (08:53 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 39847

package/kernel/mac80211/patches/300-pending_work.patch
package/kernel/mac80211/patches/523-ath9k_use_configured_antenna_gain.patch
package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
package/kernel/mac80211/patches/543-ath9k-allow-to-disable-bands-via-platform-data.patch
package/kernel/mac80211/patches/566-ath9k-ar933x-usb-hang-workaround.patch

index 548f3040248377d8826a35a89e669ac767a92178..e4eaecfd410fb337e67a997d65bf5ce80664f281 100644 (file)
@@ -1,3 +1,16 @@
+commit fcb064fdd5a27bec8d24099bc0172468f34c97cb
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Sun Mar 9 09:43:09 2014 +0100
+
+    ath9k_hw: fix unreachable code in baseband hang detection code
+    
+    The commit "ath9k: reduce baseband hang detection false positive rate"
+    added a delay in the loop checking the baseband state, however it was
+    unreachable due to previous 'continue' statements.
+    
+    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+
 commit 31959d8df39319e32c6d5ba9c135727be90cfad7
 Author: Michal Kazior <michal.kazior@tieto.com>
 Date:   Fri Mar 7 08:09:38 2014 +0100
@@ -1197,7 +1210,7 @@ Date:   Thu Jan 23 20:06:34 2014 +0100
  
        if (AR_SREV_9300(ah))
                return !ath9k_hw_detect_mac_hang(ah);
-@@ -1542,9 +1542,13 @@ bool ath9k_hw_check_alive(struct ath_hw 
+@@ -1542,9 +1542,14 @@ bool ath9k_hw_check_alive(struct ath_hw 
        if (AR_SREV_9285_12_OR_LATER(ah))
                return true;
  
@@ -1207,20 +1220,12 @@ Date:   Thu Jan 23 20:06:34 2014 +0100
 +              if (reg != last_val)
 +                      return true;
  
++              udelay(1);
 +              last_val = reg;
                if ((reg & 0x7E7FFFEF) == 0x00702400)
                        continue;
  
-@@ -1556,6 +1560,8 @@ bool ath9k_hw_check_alive(struct ath_hw 
-               default:
-                       return true;
-               }
-+
-+              udelay(1);
-       } while (count-- > 0);
-       return false;
-@@ -2051,9 +2057,8 @@ static bool ath9k_hw_set_power_awake(str
+@@ -2051,9 +2056,8 @@ static bool ath9k_hw_set_power_awake(str
  
        REG_SET_BIT(ah, AR_RTC_FORCE_WAKE,
                    AR_RTC_FORCE_WAKE_EN);
index 674c59756ec685f8fa27d7402b88ecdf317b3bc2..30aa9ee187dc51b1257e9936616c88622ade6a8d 100644 (file)
@@ -10,7 +10,7 @@
  
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2722,7 +2722,7 @@ void ath9k_hw_apply_txpower(struct ath_h
+@@ -2721,7 +2721,7 @@ void ath9k_hw_apply_txpower(struct ath_h
        channel = chan->chan;
        chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
        new_pwr = min_t(int, chan_pwr, reg->power_limit);
index c695df283527ee520a7a4b274f5c58ad2ed97286..eefe5e7bdf0e7ab8bcc46bdef8524b5b8eb8072e 100644 (file)
@@ -94,7 +94,7 @@
  struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1736,6 +1736,20 @@ fail:
+@@ -1735,6 +1735,20 @@ fail:
        return -EINVAL;
  }
  
  int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
                   struct ath9k_hw_cal_data *caldata, bool fastcc)
  {
-@@ -1941,6 +1955,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -1940,6 +1954,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
                ar9003_hw_disable_phy_restart(ah);
  
        ath9k_hw_apply_gpio_override(ah);
index 08a1a0f6f3651c570c7a748d5a08cb592aa29c6c..d26a5af865aa8075189bb4e6afc6ccadb808f61f 100644 (file)
@@ -11,7 +11,7 @@
        int (*external_reset)(void);
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2329,17 +2329,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
+@@ -2328,17 +2328,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
        }
  
        eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);
index 87292e446d11c8346dc0d20dd31e0f021418afea..af94c9e3127ee17eba9cc78994e6ef77df4e3f6c 100644 (file)
@@ -40,7 +40,7 @@
        return true;
  }
  
-@@ -1731,8 +1750,14 @@ static int ath9k_hw_do_fastcc(struct ath
+@@ -1730,8 +1749,14 @@ static int ath9k_hw_do_fastcc(struct ath
        if (AR_SREV_9271(ah))
                ar9002_hw_load_ani_reg(ah, chan);
  
@@ -55,7 +55,7 @@
        return -EINVAL;
  }
  
-@@ -1960,6 +1985,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -1959,6 +1984,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
        if (AR_SREV_9565(ah) && common->bt_ant_diversity)
                REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);