mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
768e6750d7
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37919
25 lines
734 B
Diff
25 lines
734 B
Diff
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
|
@@ -286,8 +286,12 @@ static int ath_reset_internal(struct ath
|
|
(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL))
|
|
ath9k_mci_set_txpower(sc, true, false);
|
|
|
|
- if (!ath_complete_reset(sc, true))
|
|
+ if (!ath_complete_reset(sc, true)) {
|
|
r = -EIO;
|
|
+ goto out;
|
|
+ }
|
|
+
|
|
+ sc->hw->cur_power_level = sc->curtxpow / 2;
|
|
|
|
out:
|
|
spin_unlock_bh(&sc->sc_pcu_lock);
|
|
@@ -1299,6 +1303,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);
|
|
+ hw->cur_power_level = sc->curtxpow / 2;
|
|
}
|
|
|
|
mutex_unlock(&sc->mutex);
|