Files
linux/drivers/net/wireless/ath/ath9k
Remi Pommarel 476d901d4f ath9k: Handle txpower changes even when TPC is disabled
commit 968ae2caad upstream.

When TPC is disabled IEEE80211_CONF_CHANGE_POWER event can be handled to
reconfigure HW's maximum txpower.

This fixes 0dBm txpower setting when user attaches to an interface for
the first time with the following scenario:

ieee80211_do_open()
    ath9k_add_interface()
        ath9k_set_txpower() /* Set TX power with not yet initialized
                               sc->hw->conf.power_level */

    ieee80211_hw_config() /* Iniatilize sc->hw->conf.power_level and
                             raise IEEE80211_CONF_CHANGE_POWER */

    ath9k_config() /* IEEE80211_CONF_CHANGE_POWER is ignored */

This issue can be reproduced with the following:

  $ modprobe -r ath9k
  $ modprobe ath9k
  $ wpa_supplicant -i wlan0 -c /tmp/wpa.conf &
  $ iw dev /* Here TX power is either 0 or 3 depending on RF chain */
  $ killall wpa_supplicant
  $ iw dev /* TX power goes back to calibrated value and subsequent
              calls will be fine */

Fixes: 283dd11994 ("ath9k: add per-vif TX power capability")
Cc: stable@vger.kernel.org
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-17 16:12:04 +02:00
..
2018-10-13 20:27:35 +03:00
2015-03-03 14:55:24 +02:00
2015-03-13 15:19:36 +02:00
2018-06-29 14:44:49 +03:00
2019-02-26 15:08:16 +02:00
2020-02-01 09:32:56 +00:00
2017-10-27 16:54:19 +03:00
2015-03-20 08:27:17 +02:00
2018-01-16 16:29:22 +02:00
2017-09-25 10:13:58 +03:00
2019-09-23 11:25:22 +03:00
2015-03-03 14:55:27 +02:00
2015-02-26 14:58:43 +02:00
2018-01-16 16:29:22 +02:00