diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-10-22 16:26:56 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-10-22 16:26:56 +0000 |
commit | d9ea3d2aa8bfdd6665ad9caa7a9296cadb73662d (patch) | |
tree | 39461dde138991269ce60b85b5ad6439475b9992 /package/kernel/mac80211/patches/341-ath9k_common-always-update-value-in-ath9k_cmn_update.patch | |
parent | c14e0807bd9a62e27d69d7894250d174ec9c403e (diff) | |
download | mtk-20170518-d9ea3d2aa8bfdd6665ad9caa7a9296cadb73662d.zip mtk-20170518-d9ea3d2aa8bfdd6665ad9caa7a9296cadb73662d.tar.gz mtk-20170518-d9ea3d2aa8bfdd6665ad9caa7a9296cadb73662d.tar.bz2 |
ath9k: fix tx power reporting
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43032
Diffstat (limited to 'package/kernel/mac80211/patches/341-ath9k_common-always-update-value-in-ath9k_cmn_update.patch')
-rw-r--r-- | package/kernel/mac80211/patches/341-ath9k_common-always-update-value-in-ath9k_cmn_update.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/341-ath9k_common-always-update-value-in-ath9k_cmn_update.patch b/package/kernel/mac80211/patches/341-ath9k_common-always-update-value-in-ath9k_cmn_update.patch new file mode 100644 index 0000000..625bd42 --- /dev/null +++ b/package/kernel/mac80211/patches/341-ath9k_common-always-update-value-in-ath9k_cmn_update.patch @@ -0,0 +1,31 @@ +From: Felix Fietkau <nbd@openwrt.org> +Date: Wed, 22 Oct 2014 18:16:14 +0200 +Subject: [PATCH] ath9k_common: always update value in + ath9k_cmn_update_txpow + +In some cases the limit may be the same as reg->power_limit, but the +actual value that the hardware uses is not up to date. In that case, a +wrong value for current tx power is tracked internally. +Fix this by unconditionally updating it. + +Signed-off-by: Felix Fietkau <nbd@openwrt.org> +--- + +--- a/drivers/net/wireless/ath/ath9k/common.c ++++ b/drivers/net/wireless/ath/ath9k/common.c +@@ -368,11 +368,11 @@ void ath9k_cmn_update_txpow(struct ath_h + { + struct ath_regulatory *reg = ath9k_hw_regulatory(ah); + +- if (reg->power_limit != new_txpow) { ++ if (reg->power_limit != new_txpow) + ath9k_hw_set_txpowerlimit(ah, new_txpow, false); +- /* read back in case value is clamped */ +- *txpower = reg->max_power_level; +- } ++ ++ /* read back in case value is clamped */ ++ *txpower = reg->max_power_level; + } + EXPORT_SYMBOL(ath9k_cmn_update_txpow); + |