linux/drivers/net
Remi Pommarel 19e119d4b4 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 10:48:47 +02:00
..
appletalk
arcnet
bonding bonding/alb: make sure arp header is pulled before accessing it 2020-03-18 07:14:18 +01:00
caif
can slcan: Don't transmit uninitialized stack data in padding 2020-04-13 10:45:08 +02:00
dsa net: dsa: bcm_sf2: Ensure correct sub-node is parsed 2020-04-13 10:45:07 +02:00
ethernet qlcnic: Fix bad kzalloc null test 2020-04-17 10:48:38 +02:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: Fix unwanted wakeup in netvsc_attach() 2020-03-05 16:42:19 +01:00
ieee802154
ipvlan ipvlan: don't deref eth hdr before checking it's set 2020-03-18 07:14:12 +01:00
netdevsim
phy net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers 2020-04-13 10:45:08 +02:00
plip
ppp ppp: Adjust indentation into ppp_async_input 2020-02-11 04:34:13 -08:00
slip slip: not call free_netdev before rtnl_unlock in slip_open 2020-03-20 11:55:54 +01:00
team team: add missing attribute validation for array index 2020-03-18 07:14:16 +01:00
usb net: qmi_wwan: add support for ASKEY WWHC050 2020-04-02 15:28:11 +02:00
vmxnet3
wan wan: ixp4xx_hss: fix compile-testing on 64-bit 2020-02-24 08:34:46 +01:00
wimax wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle 2020-03-20 11:55:57 +01:00
wireless ath9k: Handle txpower changes even when TPC is disabled 2020-04-17 10:48:47 +02:00
xen-netback
dummy.c
eql.c
geneve.c geneve: move debug check after netdev unregister 2020-04-02 15:28:10 +02:00
gtp.c gtp: use __GFP_NOWARN to avoid memalloc warning 2020-02-11 04:33:52 -08:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c macsec: restrict to ethernet devices 2020-04-02 15:28:10 +02:00
macvlan.c macvlan: add cond_resched() during multicast processing 2020-03-18 07:14:19 +01:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: add mutex_unlock() call and napi.skb clearing in tun_get_user() 2020-01-29 16:43:17 +01:00
veth.c
virtio_net.c
vrf.c Revert "vrf: mark skb for multicast or link-local as enslaved to VRF" 2020-03-25 08:06:14 +01:00
vsockmon.c
vxlan.c vxlan: check return value of gro_cells_init() 2020-04-02 15:28:13 +02:00
xen-netfront.c