ath9k: issue a cold reset after failures or after bringing the chip out of full sleep...
authorFelix Fietkau <nbd@openwrt.org>
Mon, 25 Feb 2013 19:53:31 +0000 (19:53 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 25 Feb 2013 19:53:31 +0000 (19:53 +0000)
SVN-Revision: 35785

package/mac80211/patches/300-pending_work.patch
package/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch
package/mac80211/patches/524-ath9k_use_configured_antenna_gain.patch
package/mac80211/patches/553-ath9k_debugfs_diag.patch
package/mac80211/patches/555-ath9k-allow-to-disable-bands-via-platform-data.patch

index 11c9a5af4d0053a62acc7ec020ab9241b75790eb..51da3cf84dc380d3ee310c2a5c4a21f871f9b317 100644 (file)
                ret = 0;
        }
        rcu_read_unlock();
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -1463,7 +1463,9 @@ static bool ath9k_hw_chip_reset(struct a
+                       reset_type = ATH9K_RESET_POWER_ON;
+               else
+                       reset_type = ATH9K_RESET_COLD;
+-      }
++      } else if (ah->chip_fullsleep || REG_READ(ah, AR_Q_TXE) ||
++                 (REG_READ(ah, AR_CR) & AR_CR_RXE))
++              reset_type = ATH9K_RESET_COLD;
+       if (!ath9k_hw_set_reset_reg(ah, reset_type))
+               return false;
index 6e2af403ef1be30a75c2fb81b0ab6d3a6fe8240a..ff6ff27a1ffa63171d6d339c100ccfc2e1d2960d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1945,8 +1945,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -1947,8 +1947,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
                REG_WRITE(ah, AR_OBS, 8);
  
        if (ah->config.rx_intr_mitigation) {
index 775bdac6411daadb945c97fac3894daeef7e7b17..fe052121590748b3f42fc18241f51ee0dca6f42e 100644 (file)
@@ -10,7 +10,7 @@
  
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2816,7 +2816,7 @@ void ath9k_hw_apply_txpower(struct ath_h
+@@ -2818,7 +2818,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 fcc7dab591448edf5214c21774ada6c00a4e8667..915f30f78914a7f8c70315600b25f483f0273fa7 100644 (file)
@@ -94,7 +94,7 @@
  void ath9k_debug_sync_cause(struct ath_common *common, u32 sync_cause);
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1745,6 +1745,20 @@ fail:
+@@ -1747,6 +1747,20 @@ fail:
        return -EINVAL;
  }
  
  int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
                   struct ath9k_hw_cal_data *caldata, bool fastcc)
  {
-@@ -2022,6 +2036,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -2024,6 +2038,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
        }
  
        ath9k_hw_apply_gpio_override(ah);
index bdb4ba0ff02a74381846da47fb3dff60a3b95618..515bb8f839bdfd80a478265be4cc3b3db882bea5 100644 (file)
@@ -12,7 +12,7 @@
  
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2412,17 +2412,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
+@@ -2414,17 +2414,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
        }
  
        eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);