2
0

521-ath9k_cur_txpower.patch 710 B

123456789101112131415161718192021222324
  1. --- a/drivers/net/wireless/ath/ath9k/main.c
  2. +++ b/drivers/net/wireless/ath/ath9k/main.c
  3. @@ -326,8 +326,12 @@ static int ath_reset_internal(struct ath
  4. sc->cur_chan->offchannel)
  5. ath9k_mci_set_txpower(sc, true, false);
  6. - if (!ath_complete_reset(sc, true))
  7. + if (!ath_complete_reset(sc, true)) {
  8. r = -EIO;
  9. + goto out;
  10. + }
  11. +
  12. + sc->hw->cur_power_level = sc->curtxpow / 2;
  13. out:
  14. spin_unlock_bh(&sc->sc_pcu_lock);
  15. @@ -1470,6 +1474,7 @@ static int ath9k_config(struct ieee80211
  16. sc->cur_chan->txpower = 2 * conf->power_level;
  17. ath9k_cmn_update_txpow(ah, sc->curtxpow,
  18. sc->cur_chan->txpower, &sc->curtxpow);
  19. + hw->cur_power_level = sc->curtxpow / 2;
  20. }
  21. mutex_unlock(&sc->mutex);