summaryrefslogtreecommitdiffstats
path: root/package/mac80211
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-01-21 17:54:44 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-01-21 17:54:44 +0000
commit0acb33d358880b052435728e67b586d187b8b2d3 (patch)
treed2798b17a023d993e6e90447ae3c5059463b8588 /package/mac80211
parentf6ceb966a6d45934fb5ebf157f4e4f30652ea8ca (diff)
ath9k: fix some ps wakeup/restore issues that led to crashes and other weird behavior
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25058 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211')
-rw-r--r--package/mac80211/patches/550-ath9k_fix_ps_wakeup_issues.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/package/mac80211/patches/550-ath9k_fix_ps_wakeup_issues.patch b/package/mac80211/patches/550-ath9k_fix_ps_wakeup_issues.patch
new file mode 100644
index 000000000..29c4f9ffd
--- /dev/null
+++ b/package/mac80211/patches/550-ath9k_fix_ps_wakeup_issues.patch
@@ -0,0 +1,61 @@
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -2111,9 +2111,7 @@ static void ath_tx_complete_poll_work(st
+ if (needreset) {
+ ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET,
+ "tx hung, resetting the chip\n");
+- ath9k_ps_wakeup(sc);
+ ath_reset(sc, true);
+- ath9k_ps_restore(sc);
+ }
+
+ ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work,
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -592,19 +592,16 @@ void ath9k_tasklet(unsigned long data)
+ struct ath_softc *sc = (struct ath_softc *)data;
+ struct ath_hw *ah = sc->sc_ah;
+ struct ath_common *common = ath9k_hw_common(ah);
+-
+ u32 status = sc->intrstatus;
+ u32 rxmask;
+
+- ath9k_ps_wakeup(sc);
+-
+ if (status & ATH9K_INT_FATAL) {
+ ath_reset(sc, true);
+- ath9k_ps_restore(sc);
+ return;
+ }
+
+ spin_lock(&sc->sc_pcu_lock);
++ ath9k_ps_wakeup(sc);
+
+ /*
+ * Only run the baseband hang check if beacons stop working in AP or
+@@ -980,6 +977,7 @@ int ath_reset(struct ath_softc *sc, bool
+ /* Stop ANI */
+ del_timer_sync(&common->ani.timer);
+
++ ath9k_ps_wakeup(sc);
+ spin_lock_bh(&sc->sc_pcu_lock);
+
+ ieee80211_stop_queues(hw);
+@@ -1026,6 +1024,7 @@ int ath_reset(struct ath_softc *sc, bool
+
+ /* Start ANI */
+ ath_start_ani(common);
++ ath9k_ps_restore(sc);
+
+ return r;
+ }
+@@ -1748,7 +1747,9 @@ static int ath9k_config(struct ieee80211
+
+ if (changed & IEEE80211_CONF_CHANGE_POWER) {
+ sc->config.txpowlimit = 2 * conf->power_level;
++ ath9k_ps_wakeup(sc);
+ ath_update_txpow(sc);
++ ath9k_ps_restore(sc);
+ }
+
+ if (disable_radio) {