aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/581-ath9k_merge_reset_functions.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-08-28 22:06:44 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-08-28 22:06:44 +0000
commitf7811664be0a7c91b29f575c9764290e67794a96 (patch)
treea897f069b16bf67b7306f0a32e4404748f25f7a9 /package/mac80211/patches/581-ath9k_merge_reset_functions.patch
parent65fbf0f9f04e7773edc8f273ac24afa232bf01d8 (diff)
downloadmaster-187ad058-f7811664be0a7c91b29f575c9764290e67794a96.tar.gz
master-187ad058-f7811664be0a7c91b29f575c9764290e67794a96.tar.bz2
master-187ad058-f7811664be0a7c91b29f575c9764290e67794a96.zip
ath9k: prevent calibration / beacons from starting too early
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28108 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/581-ath9k_merge_reset_functions.patch')
-rw-r--r--package/mac80211/patches/581-ath9k_merge_reset_functions.patch16
1 files changed, 10 insertions, 6 deletions
diff --git a/package/mac80211/patches/581-ath9k_merge_reset_functions.patch b/package/mac80211/patches/581-ath9k_merge_reset_functions.patch
index 201994db49..3bafcda1d8 100644
--- a/package/mac80211/patches/581-ath9k_merge_reset_functions.patch
+++ b/package/mac80211/patches/581-ath9k_merge_reset_functions.patch
@@ -85,7 +85,7 @@
- channel->center_freq, r);
- goto ps_restore;
- }
-+static bool ath_complete_reset(struct ath_softc *sc)
++static bool ath_complete_reset(struct ath_softc *sc, bool start)
+{
+ struct ath_hw *ah = sc->sc_ah;
+ struct ath_common *common = ath9k_hw_common(ah);
@@ -98,8 +98,12 @@
}
ath9k_cmn_update_txpow(ah, sc->curtxpow,
-@@ -299,18 +255,84 @@ static int ath_set_channel(struct ath_so
- if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) {
+@@ -296,21 +252,87 @@ static int ath_set_channel(struct ath_so
+ ath9k_hw_set_interrupts(ah, ah->imask);
+ ath9k_hw_enable_interrupts(ah);
+
+- if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) {
++ if (!(sc->sc_flags & (SC_OP_OFFCHANNEL)) && start) {
if (sc->sc_flags & SC_OP_BEACONS)
ath_set_beacon(sc);
+
@@ -154,7 +158,7 @@
+ return r;
+ }
+
-+ if (!ath_complete_reset(sc))
++ if (!ath_complete_reset(sc, true))
+ return -EIO;
+
+ return 0;
@@ -201,7 +205,7 @@
- /* Re-Enable interrupts */
- ath9k_hw_set_interrupts(ah, ah->imask);
- ath9k_hw_enable_interrupts(ah);
-+ ath_complete_reset(sc);
++ ath_complete_reset(sc, true);
/* Enable LED */
ath9k_hw_cfg_output(ah, ah->led_pin,
@@ -330,7 +334,7 @@
- ath9k_hw_enable_interrupts(ah);
- ieee80211_wake_queues(hw);
-+ if (!ath_complete_reset(sc)) {
++ if (!ath_complete_reset(sc, false)) {
+ r = -EIO;
+ spin_unlock_bh(&sc->sc_pcu_lock);
+ goto mutex_unlock;