aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/521-ath9k_cur_txpower.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-03-14 10:53:42 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-03-14 10:53:42 +0000
commit705d7a8aa438a21daa646e1dc8c5d0a45295de0c (patch)
treefc4abc713ed39e07d94d500e5f7d44cbc985f43e /package/mac80211/patches/521-ath9k_cur_txpower.patch
parent9b1e65073a8b1a571c390a1041bfe7fcd07d97ba (diff)
downloadupstream-705d7a8aa438a21daa646e1dc8c5d0a45295de0c.tar.gz
upstream-705d7a8aa438a21daa646e1dc8c5d0a45295de0c.tar.bz2
upstream-705d7a8aa438a21daa646e1dc8c5d0a45295de0c.zip
AA: mac80211: backport package from trunk r39886
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@39928 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/521-ath9k_cur_txpower.patch')
-rw-r--r--package/mac80211/patches/521-ath9k_cur_txpower.patch21
1 files changed, 13 insertions, 8 deletions
diff --git a/package/mac80211/patches/521-ath9k_cur_txpower.patch b/package/mac80211/patches/521-ath9k_cur_txpower.patch
index a14d0315f8..0d6c360d38 100644
--- a/package/mac80211/patches/521-ath9k_cur_txpower.patch
+++ b/package/mac80211/patches/521-ath9k_cur_txpower.patch
@@ -1,15 +1,20 @@
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1257,6 +1257,8 @@ int ath9k_config(struct ieee80211_hw *hw
- return -EINVAL;
- }
+@@ -308,8 +308,12 @@ static int ath_reset_internal(struct ath
+ (sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL))
+ ath9k_mci_set_txpower(sc, true, false);
-+ hw->cur_power_level = sc->curtxpow / 2;
+- if (!ath_complete_reset(sc, true))
++ if (!ath_complete_reset(sc, true)) {
+ r = -EIO;
++ goto out;
++ }
+
- /*
- * The most recent snapshot of channel->noisefloor for the old
- * channel is only available after the hardware reset. Copy it to
-@@ -1293,6 +1295,7 @@ int ath9k_config(struct ieee80211_hw *hw
++ sc->hw->cur_power_level = sc->curtxpow / 2;
+
+ out:
+ spin_unlock_bh(&sc->sc_pcu_lock);
+@@ -1371,6 +1375,7 @@ static int ath9k_config(struct ieee80211
sc->config.txpowlimit = 2 * conf->power_level;
ath9k_cmn_update_txpow(ah, sc->curtxpow,
sc->config.txpowlimit, &sc->curtxpow);